EventBuffer::pullup

(PECL event >= 1.2.6-beta)

EventBuffer::pullupLinearizes data within buffer and returns it's contents as a string

说明

public EventBuffer::pullup ( int $size ) : string

"Linearizes" the first size bytes of the buffer, copying or moving them as needed to ensure that they are all contiguous and occupying the same chunk of memory. If size is negative, the function linearizes the entire buffer.

Warning

Calling EventBuffer::pullup() with a large size can be quite slow, since it potentially needs to copy the entire buffer's contents.

参数

size

The number of bytes required to be contiguous within the buffer.

返回值

If size is greater than the number of bytes in the buffer, the function returns NULL. Otherwise, EventBuffer::pullup() returns string.

参见

相关文章
php eventbuffer append data to the end of an event bufferphp eventbuffer move all data from a buffer provided to the current instance of eventbufferphp eventbuffer removes specified number of bytes from the front of the buffer without copying it anywherephp 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 scans the buffer for an occurrence of a stringphp eventbuffer substracts a portion of the buffer dataphp eventbuffer write contents of the buffer to a file or socketphp ibm db2 函数 returns a string containing the last sql statement error messagephp mongodb bson decimal128interface returns the string representation of this decimal128interfacephp mongogridfsfile returns this file s contents as a string of bytesphp oci lob returns large object s contentsphp phardata set the contents of a file within the tar/zip to those of an external file or stringphp sqlite3stmt returns the number of parameters within the prepared statementphp swoole buffer append the string or binary data at the end of the memory buffer and return the new size of memory allocated.php swoole buffer read data from the memory buffer based on offset and length. or remove data from the memory buffer.php ziparchive returns the entry contents using its index
关注编程学问公众号