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 reserves space in bufferphp 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 bc 数学 函数 raise an arbitrary precision number to another reduced by a specified modulusphp direct io 函数 reads bytes from a file descriptorphp zlib 函数 get number of bytes read so farphp 杂项 函数 get or set vt100 support for the specified stream associated to an output buffer of a windows console.php socket 函数 reads a maximum of length bytes from a socketphp tidy 函数 returns the number of tidy warnings encountered for specified documentphp harufont calculate the number of characters which can be included within the specified widthphp solrquery returns the maximum number of characters from a field when using the regex fragmenterphp ktaglib tag returns the track number from a id3 tag
关注编程学问公众号