LC_CHANNEL_OTI_PEEK(3)

πŸ’– lc_channel_oti_peek β€” peek at the OTI header ✨

okay bestie, welcome to lc_channel_oti_peek(3), straight out of the Librecast Programmer's Manual. it's giving "sneak a look, don't touch" and honestly? iconic. πŸŽ€


πŸ“š LIBRARY

Librecast library (liblibrecast, -llibrecast) πŸ¦‹


✨ SYNOPSIS ✨

#include <librecast/net.h>

int lc_channel_oti_peek(lc_channel_t *chan, rq_oti_t *oti, rq_scheme_t *scheme);

and like, obvi, you gotta compile and link with -llibrecast or she simply will not run. periodt. πŸ’…


🌸 DESCRIPTION 🌸

so the lc_channel_oti_peek() function peeks at the OTI header β€” that's the RaptorQ FEC Object Transmission Information header, see RFC 6330 if you wanna go full nerd mode, and you should β€” sitting inside the next packet of the socket that's bound to channel chan. πŸ‘‘

then it sets oti and scheme accordingly, like the little matchmaker it is. 🫢

the whole vibe is peek, not consume. she looks, she learns, she does not eat your packet. main character energy fr fr.


🎯 RETURN VALUE 🎯

lc_channel_oti_peek() returns zero on success. slay. πŸ’š

on error, -1 is returned and errno is set to indicate the error. 😭


πŸ’€ ERRORS πŸ’€

  • EBADMSG β€” the header is malformed, or T does not match the expected value for chan. like, bestie, that header is not passing the vibe check. πŸ™ˆ

errno can also be set to any of the errors returned by lc_socket_recv(3) β€” so if you're confused, go read that one too, iykyk. πŸ¦‹


πŸ”₯ SEE ALSO πŸ”₯

lc_channel_new(3), lc_channel_close(3), lc_channel_recv(3), lc_channel_coding_set(3), lc_socket_recv(3) rq_pid2sbn(3), rq_pid2esi(3), rq_pidset(3), rq_pidsetsbn(3), rq_pidsetesi(3), lcrq(7) 🌈


and that's the whole page, no cap β€” LIBRECAST, dated 2022-07-06, filed under LC_CHANNEL_OTI_PEEK(3). go peek at some headers, you absolute legend. πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from