LC_CHANNEL_SEND(3)
π LC_CHANNEL_SEND(3) β NAME π
okay so welcome to LC_CHANNEL_SEND(3), bestie β this is the Librecast Programmer's Manual and we're talking about lc_channel_send, lc_channel_sendmsg, and their whole job, which is: sending data on a Librecast channel π
π LIBRARY
the Librecast library, obviously β that's liblibrecast, and you link it with -llibrecast π«Ά
β¨ SYNOPSIS β¨
#include <librecast/net.h>
ssize_t lc_channel_send(lc_channel_t *chan, const void *buf, size_t len, int flags)
ssize_t lc_channel_sendmsg(lc_channel_t *chan, struct msghdr *msg, int flags);
Compile and link with -llibrecast. π οΈ
π DESCRIPTION π
okay so listen. each of these functions sends data over multicast on the librecast channel chan. and here's the vibe: they are analogous to the send(2) and sendmsg(2) calls. like, same energy, same shape, but multicast. iconic behavior honestly π
so in addition to the usual flags you'd use with send(2) and sendmsg(2), these functions support this one extra flag:
MSG_DROPβ this flag makes the packet get dropped instead of sent. it's used for testing, fr fr. all the normal processing still happens, like encoding and everything, proceeds as usual β the only thing skipped is the final send syscall. and the return value? it'll be the number of bytes that would have been sent π« β¨
π¦ RETURN VALUE π¦
these calls return the number of bytes received, or -1 if an error occurred π and in the event of an error, errno is set to indicate the error. so check your errno, bestie, always.
π ERRORS π
see send(2). that's it, that's the section β go look, iykyk π
π SEE ALSO π
lc_ctx_new(3)lc_channel_new(3)send(2)sendmsg(2)
and that's the whole page, bestie!! this came to you straight from the LIBRECAST manual, dated 2023-08-09 β no cap, go forth and multicast responsibly ππ π¦
π¦ where this page comes from
- debian trixie: liblibrecast-dev 0.9.1-1 Β· GPL-2.0-only OR GPL-3.0-only
- nixos 26.05: librecast 0.11.2
- nixpkgs unstable: librecast 0.11.2
- ubuntu noble: liblibrecast-dev 0.8.0-1.1build1 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu questing: liblibrecast-dev 0.9.1-1
- ubuntu resolute: liblibrecast-dev 0.11.2-2 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu stonking: liblibrecast-dev 0.11.2-2build1 Β· GPL-2.0-only OR GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms