Results of 1 - 10 of about 11 for Bufferevent (0.003 sec.)
- The EventBufferEvent class | PHP 8.3 13300
- 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
... to become writable again. This buffered I/O pattern is common enough that Libevent provides a generic mechanism for it. A "buffer event" consists of an underlying transport (like a socket), a read buffer, and a write buffer. Instead of regular events, which ... give callbacks when the underlying transport is ready to be read or written, a buffer event invokes its user-supplied callbacks when it has read or written enough data. クラス概要 final class EventBufferEvent { /* ... mark , int $highmark ): void public function sslError (): string public static function sslFilter ( EventBase $base , EventBufferEvent $underlying , EventSslContext $ctx , int $state , int $options = 0 ): EventBufferEvent public function sslGetCipherInfo () ...
-
https://man.mtool.work/php/8.3/class.eventbufferevent.html
- EventBufferEvent::setPriority — Assign a priority to a bufferevent | PHP 8.3 10420
- EventBufferEvent::setPriority (PECL event >= 1.2.6-beta) EventBufferEvent::setPriority — Assign a priority to a bufferevent 説明 public function EventBufferEvent::setPriority ( int $priority ): bool Assign a priority to a bufferevent 警告 O
... nly supported for socket buffer events パラメータ priority Priority value. 戻り値 成功した場合に true を、失敗した場合に false を返します。 他のマニュアルの関連 ...
-
https://man.mtool.work/php/8.3/eventbufferevent.setpriority.html
- EventBufferEvent::sslRenegotiate — Tells a bufferevent to begin SSL renegotiati... 10064
- EventBufferEvent::sslRenegotiate (PECL event >= 1.2.6-beta) EventBufferEvent::sslRenegotiate — Tells a bufferevent to begin SSL renegotiation 説明 public function EventBufferEvent::sslRenegotiate (): void Tells a bufferevent to begin SSL re
... negotiation. 警告 Calling this function tells the SSL to renegotiate, and the buffer event to invoke appropriate callbacks. This is an advanced topic; this should be generally avoided unless one really knows what ...
-
https://man.mtool.work/php/8.3/eventbufferevent.sslrenegotiate.html
- EventBufferEvent::sslError — Returns most recent OpenSSL error reported on the ... 9335
- EventBufferEvent::sslError (PECL event >= 1.2.6-beta) EventBufferEvent::sslError — Returns most recent OpenSSL error reported on the buffer event 説明 public function EventBufferEvent::sslError (): string Returns most recent OpenSSL error r
... eported on the buffer event. 注意 : This function is available only if Event is compiled with OpenSSL support. パラメータ この関数にはパラメータはあり ... ません。 戻り値 Returns OpenSSL error string reported on the buffer event, or false , if there is no more error to return. 例 例1 EventBufferEvent::sslError() example <?php // This callback is in ... ner, // e.g. connection closed, or an error occurred function ssl_event_cb ( $bev , $events , $ctx ) { if ( $events & EventBufferEvent :: ERROR ) { // Fetch errors from the SSL error stack while ( $err = $bev -> sslError ()) { fprintf ( STDERR , "Buffereven ...
-
https://man.mtool.work/php/8.3/eventbufferevent.sslerror.html
- 例 | PHP 8.3 8979
- 例 例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
... $buf , 1024 )) > 0 ) { echo $buf ; } } // Event callback function eventcb ( $bev , $events , $base ) { if ( $events & EventBufferEvent :: CONNECTED ) { echo "Connected.\n" ; } elseif ( $events & ( EventBufferEvent :: ERROR | EventBufferEvent :: EOF )) { if ... ( $events & EventBufferEvent :: ERROR ) { echo "DNS error: " , $bev -> getDnsErrorString (), PHP_EOL ; } echo "Closing\n" ; $base -> exit (); exit( "Do ... base , TRUE ); // We'll use async DNS resolving if (! $dns_base ) { exit( "Failed to init DNS Base\n" ); } $bev = new EventBufferEvent ( $base , /* use internal socket */ NULL , EventBufferEvent :: OPT_CLOSE_ON_FREE | EventBufferEvent :: OPT_DEFER_CALLBACKS ...
-
https://man.mtool.work/php/8.3/event.examples.html
- EventListener::__construct — Creates new connection listener associated with an... 8144
- 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
... { $this -> bev -> free (); } public function __construct ( $base , $fd ) { $this -> base = $base ; $this -> bev = new EventBufferEvent ( $base , $fd , EventBufferEvent :: OPT_CLOSE_ON_FREE ); $this -> bev -> setCallbacks (array( $this , "echoReadCallback" ) ... tput(); $output->addBuffer($input); */ } public function echoEventCallback ( $bev , $events , $ctx ) { if ( $events & EventBufferEvent :: ERROR ) { echo "Error from bufferevent\n" ; } if ( $events & ( EventBufferEvent :: EOF | EventBufferEvent :: ERROR )) { ... ad on $bev public function acceptConnCallback ( $listener , $fd , $address , $ctx ) { // We got a new connection! Set up a bufferevent for it. */ $base = $this -> base ; $this -> conn [] = new MyListenerConnection ( $base , $fd ); } public function accept_e ...
-
https://man.mtool.work/php/8.3/eventlistener.construct.html
- EventBufferEvent::connect — Connect buffer event's file descriptor to given add... 8019
- 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 event
... nt's file descriptor to given address(optionally with port), or a UNIX domain socket. If socket is not assigned to the buffer event, this function allocates a new socket and makes it non-blocking internally. To resolve DNS names(asynchronously), use Eve ... ntBufferEvent::connectHost() method. パラメータ addr Should contain an IP address with optional port number, or a path to UNIX domain so ... nix:' prefix is currently not case sensitive. 戻り値 成功した場合に true を、失敗した場合に false を返します。 例 例1 EventBufferEvent::connect() example <?php /* * 1. Connect to 127.0.0.1 at port 80 * by means of EventBufferEvent::connect(). * * 2. Request ...
-
https://man.mtool.work/php/8.3/eventbufferevent.connect.html
- EventBufferEvent::getOutput — Returns underlying output buffer associated with ... 7788
- 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
... utput buffer associated with current buffer event. An output buffer is a storage for data to be written. Note, there is also output property of EventBufferEvent class. パラ ... メータ この関数にはパラメータはありません。 戻り値 Returns instance of EventBuffer output buffer associated with current buffer event. 例 例1 EventBufferEvent::getOutput() example <?php $base = new EventBase (); $dns_base = new EventDnsBase ( $base , TRUE ... ); // Use async DNS resolving if (! $dns_base ) { exit( "Failed to init DNS Base\n" ); } $bev = new EventBufferEvent ( $base , /* use internal socket */ NULL , EventBufferEvent :: OPT_CLOSE_ON_FREE | EventBufferEvent :: OPT_DEFER_CALLBACKS ...
-
https://man.mtool.work/php/8.3/eventbufferevent.getoutput.html
- Event | PHP 8.3 7663
- Event はじめに This is an extension to efficiently schedule I/O, time and signal based events using the best I/O notification mechanism available for specific platform. This is a port of libevent to the PHP infrastructure. 注意 : Note, Wind
... _base to stop dispatching events EventBuffer — The EventBuffer class EventBuffer::add — Append data to the end of an event buffer EventBuffer::addBuffer — Move all data from a buffer provided to the current instance of EventBuffer EventBuffer::appendFrom — ... Moves the specified number of bytes from a source buffer to the end of the current buffer EventBuffer::__construct — Constructs EventBuffer object EventBuffer::copyout — Copies out specified number of bytes from the f ... ront of the buffer EventBuffer::drain — Removes specified number of bytes from the front of the buffer without copying it anywhere EventBuffer::en ...
-
https://man.mtool.work/php/8.3/book.event.html
- EventBufferEvent::connectHost — Connects to a hostname with optionally asynchro... 7308
- 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
... on fails, it invokes the event callback with an error event. If it succeeds, it launches a connection attempt just as EventBufferEvent::connect() would. dns_base is optional. May be null , or an object created with EventDnsBase::__construct() . For asynchro ... -extra ( event_extra library, libevent protocol-specific functionality support including HTTP, DNS, and RPC ). 注意 : EventBufferEvent::connectHost() requires libevent-2.0.3-alpha or greater. パラメータ dns_base Object of EventDnsBase in case if DNS is to b ... entUtil::AF_INET6 . See EventUtil constants . 戻り値 成功した場合に true を、失敗した場合に false を返します。 例 例1 EventBufferEvent::connectHost() example <?php /* Read callback */ function readcb ( $bev , $base ) { //$input = $bev->input; //$bev->getInp ...
-
https://man.mtool.work/php/8.3/eventbufferevent.connecthost.html