Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
buffer_get_token_pred(3)    Library Functions Manual	buffer_get_token_pred(3)

NAME
     buffer_get_token_pred - read token from buffer

SYNTAX
     #include <libowfat/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 re-
     turns nonzero.

     predicate can also return 0 (indicating further input is required	to  com-
     plete 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 mal-
     formed 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)

							buffer_get_token_pred(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=libowfat_buffer_get_token_pred&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help