qb_rb_chunk_peek3
Read (without reclaiming) the last chunk.
Usage
#include <qb/qbrb.h>
ssize_t qb_rb_chunk_peek(
qb_ringbuffer_t *rb, /* ringbuffer instance */
/*
* (out) a pointer to the next chunk to read (not copied).
*/
void **data_out,
int32_t ms_timeout /* (in) time to wait for new data.*/
);
Params
rb ringbuffer instance
data_out (out) a pointer to the next chunk to read (not copied).
ms_timeout (in) time to wait for new data.
Overview
This function is a way of accessing the next chunk without a memcpy(). You can read the chunk data in place.
Return value
the size of the chunk (0 if buffer empty).
Note
This function will not "pop" the chunk, you will need to call qb_rb_chunk_reclaim().
Releases
4 releases since Debian 11 (Bullseye); the text changed 3 times.