« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 8 of about 8 for readcb (0.001 sec.)
EventBufferEvent::setCallbacks — Assigns read, write and event(status) callback... 12381
EventBufferEvent::setCallbacks (PECL event >= 1.2.6-beta) EventBufferEvent::setCallbacks — Assigns read, write and event(status) callbacks 説明 public function EventBufferEvent::setCallbacks ( callable $readcb , callable $writecb , callable ... $eventcb , mixed $arg = ? ): void Assigns read, write and event(status) callbacks. パラメータ readcb Read event callback. See About buffer event callbacks . writecb Write event callback. See About buffer event callbacks . e ...
https://man.mtool.work/php/8.3/eventbufferevent.setcallbacks.html
EventBufferEvent::__construct — Constructs EventBufferEvent object | PHP 8.3 10971
EventBufferEvent::__construct (PECL event >= 1.2.6-beta) EventBufferEvent::__construct — Constructs EventBufferEvent object 説明 public function EventBufferEvent::__construct ( EventBase $base , mixed $socket = null , int $options = 0 , cal ... lable $readcb = null , callable $writecb = null , callable $eventcb = null , mixed $arg = null ) Create a buffer event on a socket, stre ... eated as a stream(not necessarily by means of sockets extension) options One of EventBufferEvent::OPT_* constants , or 0 . readcb Read event callback. See About buffer event callbacks . writecb Write event callback. See About buffer event callbacks . e ...
https://man.mtool.work/php/8.3/eventbufferevent.construct.html
EventBufferEvent::connectHost — Connects to a hostname with optionally asynchro... 10410
EventBufferEvent::connectHost (PECL event >= 1.2.6-beta) EventBufferEvent::connectHost — Connects to a hostname with optionally asynchronous DNS resolving 説明 public function EventBufferEvent::connectHost ( EventDnsBase $dns_base , string ... ue を、失敗した場合に false を返します。 例 例1 EventBufferEvent::connectHost() example <?php /* Read callback */ function readcb ( $bev , $base ) { //$input = $bev->input; //$bev->getInput(); //$pos = $input->search("TTP"); $pos = $bev -> input -> sea ... base , /* use internal socket */ NULL , EventBufferEvent :: OPT_CLOSE_ON_FREE | EventBufferEvent :: OPT_DEFER_CALLBACKS , "readcb" , /* writecb */ NULL , "eventcb" , $base ); if (! $bev ) { exit( "Failed creating bufferevent socket\n" ); } //$bev->setC ... allbacks("readcb", /* writecb */ NULL, "eventcb", $base); $bev -> enable ( Event :: READ | Event :: WRITE ); $output = $bev -> output ; //$ ...
https://man.mtool.work/php/8.3/eventbufferevent.connecthost.html
例 | PHP 8.3 7862
例 例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 ... base , /* use internal socket */ NULL , EventBufferEvent :: OPT_CLOSE_ON_FREE | EventBufferEvent :: OPT_DEFER_CALLBACKS , "readcb" , /* writecb */ NULL , "eventcb" ); if (! $bev ) { exit( "Failed creating bufferevent socket\n" ); } //$bev->setCallbacks ... ("readcb", /* writecb */ NULL, "eventcb", $base); $bev -> enable ( Event :: READ | Event :: WRITE ); $output = $bev -> output ; //$ ... .0 * using the output buffer. * * 3. Asynchronously read the response and print it to stdout. */ // Read callback function readcb ( $bev , $base ) { $input = $bev -> getInput (); while (( $n = $input -> remove ( $buf , 1024 )) > 0 ) { echo $buf ; } } / ...
https://man.mtool.work/php/8.3/event.examples.html
EventBufferEvent::connect — Connect buffer event's file descriptor to given add... 7862
EventBufferEvent::connect (PECL event >= 1.2.6-beta) EventBufferEvent::connect — Connect buffer event's file descriptor to given address or UNIX socket 説明 public function EventBufferEvent::connect ( string $addr ): bool Connect buffer eve ... * using the output buffer. * * 3. Asynchronously read the response and print it to stdout. */ /* Read callback */ function readcb ( $bev , $base ) { $input = $bev -> getInput (); while (( $n = $input -> remove ( $buf , 1024 )) > 0 ) { echo $buf ; } } / ... ER_CALLBACKS ); if (! $bev ) { exit( "Failed creating bufferevent socket\n" ); } echo "step 2\n" ; $bev -> setCallbacks ( "readcb" , /* writecb */ NULL , "eventcb" , $base ); $bev -> enable ( Event :: READ | Event :: WRITE ); echo "step 3\n" ; /* Send ...
https://man.mtool.work/php/8.3/eventbufferevent.connect.html
EventBufferEvent::getInput — Returns underlying input buffer associated with cu... 7862
EventBufferEvent::getInput (PECL event >= 1.2.6-beta) EventBufferEvent::getInput — Returns underlying input buffer associated with current buffer event 説明 public function EventBufferEvent::getInput (): EventBuffer Returns underlying input ... tance of EventBuffer input buffer associated with current buffer event. 例 例1 Buffer event's read callback <?php function readcb ( $bev , $base ) { $input = $bev -> input ; //$bev->getInput(); while (( $n = $input -> remove ( $buf , 1024 )) > 0 ) { ec ...
https://man.mtool.work/php/8.3/eventbufferevent.getinput.html
The EventBufferEvent class | PHP 8.3 7573
The EventBufferEvent class (PECL event >= 1.2.6-beta) はじめに Represents Libevent's buffer event. Usually an application wants to perform some amount of data buffering in addition to just responding to events. When we want to write data, f ... til::AF_UNSPEC ): bool public function __construct ( EventBase $base , mixed $socket = null , int $options = 0 , callable $readcb = null , callable $writecb = null , callable $eventcb = null , mixed $arg = null ) public static function createPair ( Eve ... read ( int $size ): string public function readBuffer ( EventBuffer $buf ): bool public function setCallbacks ( callable $readcb , callable $writecb , callable $eventcb , mixed $arg = ? ): void public function setPriority ( int $priority ): bool publi ...
https://man.mtool.work/php/8.3/class.eventbufferevent.html
EventBufferEvent::getOutput — Returns underlying output buffer associated with ... 7302
EventBufferEvent::getOutput (PECL event >= 1.2.6-beta) EventBufferEvent::getOutput — Returns underlying output buffer associated with current buffer event 説明 public function EventBufferEvent::getOutput (): EventBuffer Returns underlying o ... base , /* use internal socket */ NULL , EventBufferEvent :: OPT_CLOSE_ON_FREE | EventBufferEvent :: OPT_DEFER_CALLBACKS , "readcb" , /* writecb */ NULL , "eventcb" , $base ); if (! $bev ) { exit( "Failed creating bufferevent socket\n" ); } $bev -> enab ...
https://man.mtool.work/php/8.3/eventbufferevent.getoutput.html
PREV 1 NEXT