vrb_get(3)

πŸ“¦ version 0.5.1, in nixos 26.05

πŸ’– 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