vrb_get(3)
π vrb_get(3) β VRB Programmer's Manual π
okay bestie, welcome to vrb_get(3) from the VRB Programmer's Manual. This is the little function that scoops data out of a VRB and hands it over. Slay.
β¨ NAME β¨
vrb_get β get data from a VRB
π LIBRARY π
you link against -lvrb, obviously π
π¦ SYNOPSIS π¦
#include <vrb.h>
size_t vrb_get(vrb_p vrb, char *target, size_t size);
πΈ DESCRIPTION πΈ
okay so vrb_get gets data from a virtual ring buffer and copies it into the space provided by the caller. If less data is available in the virtual ring buffer, then only as much will be copied as is available. No cap, it just gives you whatβs actually there π
π ARGUMENTS π
vrb_p vrbβ tells it which virtual ring buffer weβre working with.char *targetβ tells it where to copy the data to.size_t sizeβ the maximum length of data to obtain from the virtual ring buffer. Itβs the limit, bestie.
π₯ RETURN VALUE π₯
The return type is size_t.
The actual length of data copied is returned, which can be any value from 0 to the specified size. Periodt.
π ERRORS π
If an error is returned, then errno will have the following value:
EINVALβ an invalid virtual ring buffer pointer was specified. Yeah, that pointer was not it π
π SEE ALSO π
the whole VRB squad is right here, iykyk: vrb(3), vrb_capacity(3), vrb_data_len(3), vrb_data_ptr(3), vrb_destroy(3), vrb_get_min(3), vrb_give(3), vrb_init(3), vrb_init_opt(3), vrb_is_empty(3), vrb_is_full(3), vrb_is_not_empty(3), vrb_is_not_full(3), vrb_move(3), vrb_new(3), vrb_new_opt(3), vrb_put(3), vrb_put_all(3), vrb_read(3), vrb_read_min(3), vrb_resize(3), vrb_space_len(3), vrb_space_ptr(3), vrb_take(3), vrb_uninit(3), vrb_write(3), vrb_write_min(3).
made with π by the vrb crew, dated 2002-09-30 β thatβs the source/version and date, bestie, and thatβs a wrap π«Άβ¨
π¦ where this page comes from
- nixos 26.05: vrb 0.5.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms