(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, for example, the usual pattern looks like:
Decide that we want to write some data to a connection; put that data in a buffer.
Wait for the connection to become writable
Write as much of the data as we can
Remember how much we wrote, and if we still have more data to write, wait for the connection 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.
$addr) : bool
$family= EventUtil::AF_UNSPEC ] ) : bool
$options= 0 [, callable
$events) : bool
$events) : bool
$size) : string
$arg] ) : void
$priority) : bool
$timeout_write) : bool
$highmark) : void
$options= 0 ] ) : EventBufferEvent
$options] ) : EventBufferEvent
$data) : bool
Numeric file descriptor associated with the buffer event. Normally
represents a bound socket. Equals to
NULL, if there is no file
descriptor(socket) associated with the buffer event.
The priority of the events used to implement the buffer event.
Underlying input buffer object( EventBuffer )
Underlying output buffer object( EventBuffer )
An event occured during a read operation on the bufferevent. See the other flags for which event it was.
An event occured during a write operation on the bufferevent. See the other flags for which event it was.
Got an end-of-file indication on the buffer event.
Finished a requested connection on the bufferevent.
When the buffer event is freed, close the underlying transport. This will close an underlying socket, free an underlying buffer event, etc.
Automatically allocate locks for the bufferevent, so that it’s safe to use from multiple threads.
When this flag is set, the bufferevent defers all of its callbacks. See » Fast portable non-blocking network programming with Libevent, Deferred callbacks .
By default, when the bufferevent is set up to be threadsafe, the buffer event’s locks are held whenever the any user-provided callback is invoked. Setting this option makes Libevent release the buffer event’s lock when it’s invoking the callbacks.
The SSL handshake is done
SSL is currently performing negotiation as a client
SSL is currently performing negotiation as a server