unsigned char* evbuffer_find (struct evbuffer *buffer, const unsigned char *what, size_tlen)
Find a string within an evbuffer.
Parameters:
buffer the evbuffer to be searched
what the string to be searched for
len the length of the search string
Returns:
a pointer to the beginning of the search string, or NULL if the search failed.
char* evbuffer_readline (struct evbuffer *buffer)
Obsolete alias for evbuffer_readln(buffer, NULL, EOL_STYLE_ANY).
Deprecated
This function is deprecated because its behavior is not correct for almost any protocol, and also because it's wholly subsumed by evbuffer_readln().
Parameters:
buffer the evbuffer to read from
Returns:
pointer to a single line, or NULL if an error occurred
void evbuffer_setcb (struct evbuffer *buffer, evbuffer_cbcb, void *cbarg)
Replace all callbacks on an evbuffer with a single new callback, or remove them. Subsequent calls to
evbuffer_setcb() replace callbacks set by previous calls. Setting the callback to NULL removes any previously set callback.
Deprecated
This function is deprecated because it clears all previous callbacks set on the evbuffer, which can cause confusing behavior if multiple parts of the code all want to add their own callbacks on a buffer. Instead, use evbuffer_add(), evbuffer_del(), and evbuffer_setflags() to manage your own evbuffer callbacks without interfering with callbacks set by others.
Parameters:
buffer the evbuffer to be monitored
cb the callback function to invoke when the evbuffer is modified, or NULL to remove all callbacks.
cbarg an argument to be provided to the callback function