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 re enable calls that modify an event bufferphp eventbuffer write contents of the buffer to a file or socketphp eventbufferevent read buffer s dataphp eventhttprequest returns the output buffer of the requestphp 多字节字符串 函数 returns position and length of a matched part of the multibyte regular expression for a predefined multibyte stringphp openal 函数 load a buffer with dataphp gearmanclient returns an error string for the last error encounteredphp mongogridfsfile returns this file s contents as a string of bytesphp normalizer normalizes the input provided and returns the normalized stringphp phardata set the contents of a file within the tar/zip to those of an external file or stringphp swoole buffer append the string or binary data at the end of the memory buffer and return the new size of memory allocated.
关注编程学问公众号