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


Manual Reference Pages  -  LIBOWFAT_BUFFER_GET_TOKEN_PRED (3)

NAME

buffer_get_token_pred - read token from buffer

CONTENTS

Syntax
Description

SYNTAX

#include <buffer.h>

ssize_t buffer_get_token_pred(buffer* b,char* x,size_t len,
int (*predicate)(const char* s,size_t len));

DESCRIPTION

buffer_get_token_pred copies data from b to x[0], x[1], ..., x[len-1] until len bytes have been read or predicate called on the destination string returns nonzero.

predicate can also return 0 (indicating further input is required to complete the token) or -1 (abort and return -1; use this if predicate wants to enfore a maximum message size or does timeout handling or detects a malformed message).

buffer_get_token_pred returns the number of bytes copied or -1 on error (setting errno appropriately).

SEE ALSO

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


BUFFER_GET_TOKEN_PRED (3) -->

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