LC_CHANNEL_FILTER_SET(3)
β¨ NAME β¨
lc_channel_filter_set β bestie, this is the one that sets the filter for a channel π
(it's a section 3 function, so it lives in the Librecast Programmer's Manual, obvi)
π LIBRARY
This cutie ships with the Librecast library β that's liblibrecast, and you link it with -llibrecast π«Ά
π SYNOPSIS π
#include <librecast/key.h>
void lc_channel_filter_set(lc_channel_t *chan, lc_filter_t *filter);
Compile and link with -llibrecast. β¨
π¦ DESCRIPTION π¦
okay so here's the tea, bestie β β lc_channel_filter_set() takes your filter and applies it to the channel chan, specifically for receiving. That's it. That's the whole job. She's a one-task queen π
And the way it works? Packets that do not match this filter get dropped silently π like, no drama, no error, no nothin' β they just vanish into the void. Which means calls to recv functions like lc_channel_recv(3) will not return until a packet shows up that actually passes the filter. So if nothing matches, you're justβ¦ waiting. Patiently. Main character energy in the waiting room πΈ
ngl, keep that in mind β a filter that nothing matches means your recv call is gonna be sitting there for a minute. Not a bug, just the vibe check doing its thing π
π RETURN VALUE π
None. Nothing. Nada. She does her thing and gives you absolutely nothing back, and honestly? Iconic. No return value to stress about, bestie π«Ά
π ERRORS π
None. Zero. Not a single one. The error list is giving empty group chat π
π SEE ALSO π
Go read these next, fr fr β they're all part of the same little friend group:
lc_keyring_add(3)lc_keyring_del(3)lc_keyring_init(3)lc_keyring_free(3)lc_channel_token_set(3)lc_channel_new(3)
and that's a wrap on this one, bestie π it's LIBRECAST, dated 2025-04-02, and honestly? she ate. periodt β¨πΈπ¦
π¦ where this page comes from
- nixos 26.05: librecast 0.11.2
- nixpkgs unstable: librecast 0.11.2
- 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