Manual browser: evtag(3)
evtag(3) | Library Functions Manual | evtag(3) |
NAME
evtag -Helper functions for reading and writing tagged data onto buffers.
SYNOPSIS
#include <event2/tag.h>Functions
int evtag_consume (struct evbuffer *evbuf)
Detailed Description
Helper functions for reading and writing tagged data onto buffers.Function Documentation
void evtag_encode_int (struct evbuffer *evbuf, ev_uint32_tnumber)
Encode an integer and store it in an evbuffer. We encode integers by nybbles; the first nibble contains the number of significant nibbles - 1; this allows us to encode up to 64-bit integers. This function is byte-order independent.Parameters:
evbuf evbuffer to store the encoded number
number a 32-bit integer
int evtag_unmarshal_header (struct evbuffer *evbuf, ev_uint32_t *ptag)
Unmarshals the header and returns the length of the payload. Parameters:
evbuf the buffer from which to unmarshal data
ptag a pointer in which the tag id is being stored
Returns:
-1 on failure or the number of bytes in the remaining payload.
Author
Generated automatically by Doxygen for libevent from the source code.Wed Apr 10 2013 | libevent |