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 ibm db2 函数 returns the maximum number of bytes required to display a columnphp expect 函数 waits until the output from a process matches one of the patterns a specified time period has passed or an eof is seenphp frontbase 函数 returns the error number from previous operationphp firebird/interbase 函数 get len bytes data from open blobphp maxdb 函数 returns the number of warnings from the last query for the given linkphp ncurses 函数 copies a region from a pad into the virtual screenphp runkit 函数 copies a method from class to anotherphp com 函数 rounds a variant to the specified number of decimal placesphp harudoc load the font with the specified index from ttc filephp swoole buffer read data from the memory buffer based on offset and length. or remove data from the memory buffer.
关注编程学问公众号