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 acquires a lock on bufferphp eventbuffer prepend data to the front of the bufferphp eventbuffer moves all data from source buffer to the front of current bufferphp eventbuffer linearizes data within buffer and returns it s contents as a stringphp 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 zlib 函数 get number of bytes read so farphp mcve 函数 get a specific cell from a comma delimited response by column numberphp ncurses 函数 copies a region from a pad into the virtual screenphp 杂项 函数 get or set vt100 support for the specified stream associated to an output buffer of a windows console.php svn 函数 checks out a working copy from the repositoryphp mysqli returns the number of warnings from the last query for the given linkphp swoole buffer read data from the memory buffer based on offset and length.
关注编程学问公众号