« EventBuffer::prependBuffer
EventBuffer::read »

EventBuffer::pullup

(PECL event >= 1.2.6-beta)

EventBuffer::pullup — Linearizes data within buffer and returns its contents as a string

説明

public function 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.

警告

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.

参考

関連キーワード:
buffer   EventBuffer   bytes   size   pullup   number   Linearizes   within   contents   read   specified   front   copying   contiguous   entire   drain   prependBuffer   event   beta   first   moving   them   needed   ensure   they
関連する関数・ページ:
eventbuffer.read   eventbuffer.drain   eventbuffer.copyout   eventbuffer.readfrom   eventbuffer.appendfrom   eventbuffer.readline