« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 2 of about 2 for acceptConnCallback (0.001 sec.)
EventListener::__construct — Creates new connection listener associated with an... 11228
EventListener::__construct (PECL event >= 1.2.6-beta) EventListener::__construct — Creates new connection listener associated with an event base 説明 public function EventListener::__construct ( EventBase $base , callable $cb , mixed $data ... .0.0', $port)) { echo "Unable to bind socket\n"; exit(1); } $this->listener = new EventListener($this->base, array($this, "acceptConnCallback"), $this->base, EventListener::OPT_CLOSE_ON_FREE | EventListener::OPT_REUSEABLE, -1, $this->socket); */ // Variant #2 $thi ... s -> listener = new EventListener ( $this -> base , array( $this , "acceptConnCallback" ), $this -> base , EventListener :: OPT_CLOSE_ON_FREE | EventListener :: OPT_REUSEABLE , - 1 , "0.0.0.0: $port " ); if (! ... spatch () { $this -> base -> dispatch (); } // This callback is invoked when there is data to read on $bev public function acceptConnCallback ( $listener , $fd , $address , $ctx ) { // We got a new connection! Set up a bufferevent for it. */ $base = $this -> base ...
https://man.mtool.work/php/8.3/eventlistener.construct.html
例 | PHP 8.3 7485
例 例1 Simple HTTP client <?php // Read callback function readcb ( $bev , $base ) { //$input = $bev->input; //$bev->getInput(); //$pos = $input->search("TTP"); $pos = $bev -> input -> search ( "TTP" ); while (( $n = $bev -> input -> remove ... .0.0', $port)) { echo "Unable to bind socket\n"; exit(1); } $this->listener = new EventListener($this->base, array($this, "acceptConnCallback"), $this->base, EventListener::OPT_CLOSE_ON_FREE | EventListener::OPT_REUSEABLE, -1, $this->socket); */ // Variant #2 $thi ... s -> listener = new EventListener ( $this -> base , array( $this , "acceptConnCallback" ), $this -> base , EventListener :: OPT_CLOSE_ON_FREE | EventListener :: OPT_REUSEABLE , - 1 , "0.0.0.0: $port " ); if (! ... spatch () { $this -> base -> dispatch (); } // This callback is invoked when there is data to read on $bev public function acceptConnCallback ( $listener , $fd , $address , $ctx ) { // We got a new connection! Set up a bufferevent for it. */ $base = $this -> base ...
https://man.mtool.work/php/8.3/event.examples.html
PREV 1 NEXT