EventBuffer::pullup
(PECL event >= 1.2.6-beta)
EventBuffer::pullup — Linearizes data within buffer and returns it's contents as a string
Description
$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.
Return Values
If
size
is greater than the number of bytes in the buffer, the function returns
NULL
. Otherwise,
EventBuffer::pullup()
returns string.
See Also
- EventBuffer::copyout() - Copies out specified number of bytes from the front of the buffer
- EventBuffer::drain() - Removes specified number of bytes from the front of the buffer without copying it anywhere
- EventBuffer::read() - Read data from an evbuffer and drain the bytes read
- EventBuffer::readLine() - Extracts a line from the front of the buffer
- EventBuffer::appendFrom() - Moves the specified number of bytes from a source buffer to the end of the current buffer
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-eventbuffer.pullup.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.