Results of 1 - 10 of about 38 for EventBufferEvent (0.001 sec.)
- The EventBufferEvent class | PHP 8.3 11997
- 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
... ritten, a buffer event invokes its user-supplied callbacks when it has read or written enough data. クラス概要 final class EventBufferEvent { /* 定数 */ const int READING = 1 ; const int WRITING = 2 ; const int EOF = 16 ; const int ERROR = 32 ; const int TIMEOUT ... $lowmark , 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 () ... blic static function sslSocket ( EventBase $base , mixed $socket , EventSslContext $ctx , int $state , int $options = ? ): EventBufferEvent public function write ( string $data ): bool public function writeBuffer ( EventBuffer $buf ): bool } プロパティ fd Numeri ...
-
https://man.mtool.work/php/8.3/class.eventbufferevent.html
- About buffer event callbacks | PHP 8.3 10959
- About buffer event callbacks An object of EventBufferEvent class represents a buffer event . The asynchronous nature of I/O performed by Libevent implies that a socket(or other kind of file descriptor) is not always available. Event invokes
... occurs(e.g. error, "end of line" etc.). Read and write callbacks should match the following prototype: function callback ( EventBufferEvent $bev = null , mixed $arg = null ): void bev Associated EventBufferEvent object. arg Custom variable attached to all callba ... cks via EventBufferEvent::__construct() , or EventBufferEvent::setCallbacks() . Event callback should match the following prototype: function callb ... ack ( EventBufferEvent $bev = null , int $events = 0 , mixed $arg = null ): void bev Associated EventBufferEvent object. events Bit mask of event ...
-
https://man.mtool.work/php/8.3/eventbufferevent.about.callbacks.html
- Event | PHP 8.3 10660
- 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
... event_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 — ... f line EventBuffer::substr — Subtracts a portion of the buffer data EventBuffer::unfreeze — Re-enable calls that modify an event buffer EventBuffer::unlock — Releases lock acquired by EventBuffer::lock EventBuffer::write — Write contents of the buffer to a file ... or socket EventBufferEvent — The EventBufferEvent class EventBufferEvent::close — Closes file descriptor associated with the current buffer event Eve ...
-
https://man.mtool.work/php/8.3/book.event.html
- EventBufferEvent::connect — Connect buffer event's file descriptor to given add... 10283
- 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
... vent, this function allocates a new socket and makes it non-blocking internally. To resolve DNS names(asynchronously), use EventBufferEvent::connectHost() method. パラメータ addr Should contain an IP address with optional port number, or a path to UNIX domain so ... e, 'unix:' 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 ... ( $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 ...
-
https://man.mtool.work/php/8.3/eventbufferevent.connect.html
- EventBufferEvent::sslSocket — Creates a new SSL buffer event to send its data o... 10189
- EventBufferEvent::sslSocket (PECL event >= 1.2.6-beta) EventBufferEvent::sslSocket — Creates a new SSL buffer event to send its data over an SSL on a socket 説明 public static function EventBufferEvent::sslSocket ( EventBase $base , mixed $
... socket , EventSslContext $ctx , int $state , int $options = ? ): EventBufferEvent Creates a new SSL buffer event to send its data over an SSL on a socket. パラメータ base Associated event base. socket Soc ... f socket is null , it is assumed that the file descriptor for the socket will be assigned later, for instance, by means of EventBufferEvent::connectHost() method. ctx Object of EventSslContext class. state The current state of SSL connection: EventBufferEvent::S ... SL_OPEN , EventBufferEvent::SSL_ACCEPTING or EventBufferEvent::SSL_CONNECTING . options The buffer event options. 戻り値 Returns EventBufferEvent obj ...
-
https://man.mtool.work/php/8.3/eventbufferevent.sslsocket.html
- EventBufferEvent::createPair — Creates two buffer events connected to each othe... 9638
- EventBufferEvent::createPair (PECL event >= 1.2.6-beta) EventBufferEvent::createPair — Creates two buffer events connected to each other 説明 public static function EventBufferEvent::createPair ( EventBase $base , int $options = 0 ): array
... Returns array of two EventBufferEvent objects connected to each other. All the usual options are supported, except for EventBufferEvent::OPT_CLOSE_ON_FREE , whi ... ch has no effect, and EventBufferEvent::OPT_DEFER_CALLBACKS , which is always on. パラメータ base Associated event base options EventBufferEvent::OPT_* constants ... combined with bitwise OR operator. 戻り値 Returns array of two EventBufferEvent objects connected to each other. 変更履歴 バージョン 説明 PECL event 1.9.0 Method made static. 他のマニュアルの関連ページ ...
-
https://man.mtool.work/php/8.3/eventbufferevent.createpair.html
- EventBufferEvent::connectHost — Connects to a hostname with optionally asynchro... 9167
- 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
... olution 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 ... event-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 ... or EventUtil::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
- EventBufferEvent::getOutput — Returns underlying output buffer associated with ... 9119
- 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
... ed 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 wit ... h current buffer event. 例 例1 EventBufferEvent::getOutput() example <?php $base = new EventBase (); $dns_base = new EventDnsBase ( $base , TRUE ); // Use async DNS resol ... ving 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
- EventBufferEvent::__construct — Constructs EventBufferEvent object | PHP 8.3 8946
- 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
... ocket, stream or a file descriptor. Passing null to socket means that the socket should be created later, e.g. by means of EventBufferEvent::connect() . パラメータ base Event base that should be associated with the new buffer event. socket May be created as a st ... ream(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 ... us-change event callback. See About buffer event callbacks . arg A variable that will be passed to all the callbacks. 参考 EventBufferEvent::sslFilter() - Create a new SSL buffer event to send its data over another buffer event EventBufferEvent::sslSocket() - Cr ...
-
https://man.mtool.work/php/8.3/eventbufferevent.construct.html
- EventBufferEvent::sslError — Returns most recent OpenSSL error reported on the ... 8946
- 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
... 。 戻り値 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 invoked when some event occurs on the event listener, // e.g. connection clo ... sed, 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 ... t error %s.\n" , $err ); } } if ( $events & ( EventBufferEvent :: EOF | EventBufferEvent :: ERROR )) { $bev -> free (); } } ?> 参考 EventBufferEvent::sslRenegotiate() - Tells a bufferev ...
-
https://man.mtool.work/php/8.3/eventbufferevent.sslerror.html