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_getn(3) FreeBSD Library Functions Manual buffer_getn(3)

buffer_getn - read binary data from buffer

#include <libowfat/buffer.h>

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

buffer_getn copies data to x[0], x[1], ..., x[len-1] from the buffer, calling buffer_feed as needed, and returns len.

If a read error occurs, buffer_getn returns -1 and sets errno appropriately. It may then have put any number between 0 and len in the buffer, you can't tell. That makes this function only useful if you don't care when an error occurs. Use buffer_get otherwise.

If the read operation signals end-of-file before len bytes were read, buffer_getn returns the number of bytes read from the buffer before end-of-file.

buffer_init(3), buffer_get(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.