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 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 sqlite 函数 encode binary data before returning it from an udfphp statistic 函数 returns the pearson correlation coefficient of two data setsphp yp/nis 函数 returns the error string associated with the given error codephp gmagick returns the graphicsmagick api copyright as a stringphp harudoc write the document data to the output bufferphp mongogridfsfile returns this file s contents as a string of bytesphp phardata set the contents of a file within the tar/zip to those of an external file or stringphp reflectionclassconstant returns the string representation of the reflectionclassconstant objectphp sdo das xml 函数 returns sdo das xml document for a given xml instance stringphp swoole buffer append the string or binary data at the end of the memory buffer and return the new size of memory allocated.
关注编程学问公众号