(PECL event >= 1.2.6-beta)
EventBuffer::remove — Read data from an evbuffer and drain the bytes read
&$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.
data
Storage for the string read.
max_bytes
Maxmimum number of bytes to read from the buffer.
Returns the number of bytes read, or
-1
if it can't drain the buffer.