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 eventbufferevent returns bitmask of events currently enabled on the buffer eventphp eventbufferevent creates a new ssl buffer event to send its data over an ssl on a socketphp maxdb 函数 returns a string description of the last errorphp maxdb 函数 returns the maxdb client version as a stringphp pdf 函数 get contents of pcos path with type stream fstream or stringphp mongodb bson binaryinterface returns the binaryinterface s dataphp 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 sqlite3 returns the sqlite3 library version as a string constant and as a numberphp swoole buffer append the string or binary data at the end of the memory buffer and return the new size of memory allocated.
关注编程学问公众号