GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
buffer_get(3) FreeBSD Library Functions Manual buffer_get(3)

buffer_get - read binary data from buffer

#include <libowfat/buffer.h>

ssize_t buffer_get(buffer* b,char* x,size_t len);

Normally buffer_get copies data to x[0], x[1], ..., x[len-1] from the beginning of a string stored in preallocated space; removes these len bytes from the string; and returns len.

If, however, the string has fewer than len (but more than 0) bytes, buffer_get copies only that many bytes, and returns that number.

If the string is empty, buffer_get first uses a read operation to feed data into the string. The read operation may indicate end of input, in which case buffer_get returns 0; or a read error, in which case buffer_get returns -1, setting errno appropriately.

The preallocated space and the read operation are specified by b. You must initialize b using buffer_init before calling buffer_get (or use the pre-initialized buffer_0).

buffer_init(3), buffer_feed(3), buffer_peek(3), buffer_seek(3), buffer(3)

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.