EventBuffer
PHP Manual

EventBuffer::remove

(PECL event >= 1.2.6-beta)

EventBuffer::removeRead data from an evbuffer and drain the bytes read

Description

public int EventBuffer::remove ( string &$data , 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

data

Storage for the string read.

max_bytes

Maxmimum number of bytes to read from the buffer.

Return Values

Returns the number of bytes read, or -1 if it can't drain the buffer.

See Also


EventBuffer
PHP Manual