EventBuffer::readFrom

(PECL event >= 1.7.0) Read data from a file onto the end of the buffer public int EventBuffer::read ( mixed $fd , int $howmuch ) Read data from the file specified by fd onto the end of the buffer. Parameters: fd Socket resource, stream, or numeric file descriptor. howmuch Maxmimum number of bytes to read. Returns

EventBuffer::read

(PECL event >= 1.6.0) Read data from an evbuffer and drain the bytes read public string EventBuffer::read ( int $max_bytes ) Read the first max_bytes from the buffer and drain the bytes read. If more max_bytes are requested than are available in the buffer, it only extracts as many bytes as available. Parameters: max_bytes Maxmimum number of bytes to read from the buf

EventBuffer::pullup

(PECL event >= 1.2.6-beta) Linearizes data within buffer and returns it's contents as a string public string EventBuffer::pullup ( int $size ) "Linearizes" the first size bytes of the buffer, copying or moving them as needed to ensure that they are all contiguous and occupying the same chunk of memory. If size is negative, the function linearizes the entire buffer. Parameters: siz

EventBuffer::prependBuffer

(PECL event >= 1.2.6-beta) Moves all data from source buffer to the front of current buffer public bool EventBuffer::prependBuffer ( EventBuffer $buf ) Behaves as EventBuffer::addBuffer() , except that it moves data to the front of the buffer. Parameters: buf Source buffer. Returns: Returns TRUE on success. Otherwise FALSE.

EventBuffer::prepend

(PECL event >= 1.2.6-beta) Prepend data to the front of the buffer public bool EventBuffer::prepend ( string $data ) Prepend data to the front of the buffer. Parameters: data String to be prepended to the front of the buffer. Returns: Returns TRUE on success. Otherwise FALSE. S

EventBuffer::lock

(PECL event >= 1.2.6-beta) Acquires a lock on buffer public void EventBuffer::lock ( void ) Acquires a lock on buffer. Can be used in pair with EventBuffer::unlock() to make a set of operations atomic, i.e. thread-safe. Note, it is not needed to lock buffers for individual operations. When locking is enabled(see EventBuffer::enableLocking() ), individual operations on event buffers are already atomic.

EventBuffer::freeze

(PECL event >= 1.2.6-beta) Prevent calls that modify an event buffer from succeeding public bool EventBuffer::freeze ( bool $at_front ) Prevent calls that modify an event buffer from succeeding Parameters: at_front Whether to disable changes to the front or end of the buffer. Returns: Returns TRUE on success. Otherwise FALSE.

EventBuffer::expand

(PECL event >= 1.2.6-beta) Reserves space in buffer public bool EventBuffer::expand ( int $len ) Alters the last chunk of memory in the buffer, or adds a new chunk, such that the buffer is now large enough to contain len bytes without any further allocations. Parameters: len The number of bytes to reserve for the buffer Returns: Returns TRUE

EventBuffer::enableLocking

(PECL event >= 1.2.6-beta) public void EventBuffer::enableLocking ( void ) Enable locking on an EventBuffer so that it can safely be used by multiple threads at the same time. When locking is enabled, the lock will be held when callbacks are invoked. This could result in deadlock if you aren't careful. Plan accordingly! Returns: No value is returned.

EventBuffer::drain

(PECL event >= 1.2.6-beta) Removes specified number of bytes from the front of the buffer without copying it anywhere public bool EventBuffer::drain ( int $len ) Behaves as EventBuffer::read() , except that it does not copy the data: it just removes it from the front of the buffer. Parameters: len The number of bytes to remove from the buffer. Retu