LIBRARY
-lvrbSYNOPSIS
#include <vrb.h>size_t vrb_get(vrb_p vrb, char *target, size_t size);
DESCRIPTION
vrb_get Get data from a virtual ring buffer and copy it to the space provider by the caller. If less data is available in the virtual ring buffer, then only as much will be copied as is available.ARGUMENTS
vrb_p vrbspecifies which virtual ring buffer.
char *target
specifies the location where to copy the data to.
size_t size
specifies the maximum length of data to obtain from the
virtual ring buffer.
RETURN VALUE
size_tThe actual length of data copied is returned, which can be any value from 0 to the specified size.
ERRORS
If an error is returned, then errno will have the following value:- EINVAL
- An invalid virtual ring buffer pointer was specified.