EventBuffer::copyout

(PECL event >= 1.2.6-beta)

EventBuffer::copyoutCopies out specified number of bytes from the front of the buffer

说明

public EventBuffer::copyout ( string &$data , int $max_bytes ) : int

Behaves just like EventBuffer::read() , but does not drain any data from the buffer. I.e. it copies the first max_bytes bytes from the front of the buffer into data . If there are fewer than max_bytes bytes available, the function copies all the bytes there are.

参数

data

Output string.

max_bytes

The number of bytes to copy.

返回值

Returns the number of bytes copied, or -1 on failure.

参见

相关文章
php eventbuffer move all data from a buffer provided to the current instance of eventbufferphp eventbuffer moves the specified number of bytes from a source buffer to the end of the current bufferphp eventbuffer copies out specified number of bytes from the front of the bufferphp eventbuffer removes specified number of bytes from the front of the buffer without copying it anywherephp eventbuffer prevent calls that modify an event buffer from succeedingphp eventbuffer prepend data to the front of the bufferphp eventbuffer moves all data from source buffer to the front of current bufferphp eventbuffer read data from an evbuffer and drain the bytes readphp eventbuffer read data from a file onto the end of the bufferphp eventbuffer extracts a line from the front of the bufferphp eventbuffer scans the buffer for an occurrence of an end of linephp eventbuffer substracts a portion of the buffer dataphp eventbuffer re enable calls that modify an event bufferphp eventbuffer write contents of the buffer to a file or socketphp sodium 函数 generate a deterministic sequence of bytes from a seedphp stream 函数 copies data from one stream to anotherphp tidy 函数 returns the number of tidy accessibility warnings encountered for specified documentphp tidy 函数 returns the number of tidy configuration errors encountered for specified documentphp harupage draw a line from the current point to the specified pointphp mysqlnduhconnection returns the number of warnings from the last query for the given link
关注编程学问公众号