LC_SOCKETPAIR(3)
β¨ LC_SOCKETPAIR β¨
okay bestie, so this is the lc_socketpair page from the Librecast Programmer's Manual and it's literally about making two sockets that are already obsessed with each other π
πΈ NAME πΈ
lc_socketpair β create a pair of connected Librecast sockets
π LIBRARY π
Librecast library (liblibrecast, -llibrecast)
π SYNOPSIS π
#include <librecast/net.h>
int lc_socketpair(lc_ctx_t *ctx, lc_socket_t *sock[2]);
Compile and link with -llibrecast. no cap, that's the whole thing π«Ά
π¦ DESCRIPTION π¦
So like, lc_socketpair() creates a pair of connected Librecast sockets. two of them. a duo. a little matched set. iconic behavior honestly π
When you're done with them, call lc_socket_close(3). please. do it. don't leave them hanging π
Sockets can also be freed by a call to lc_ctx_free(3) on the Librecast context β and that one is a full send because it frees the context and all associated sockets and channels. everything goes. clean slate. slay π
β RETURN VALUE β
- On success, zero is returned. π
- On error,
-1is returned, anderrnois set to indicate the error.
π ERRORS π
lc_socketpair() can fail with the following errors:
ENOMEMβ Out of memory. Possibly, the application hit theRLIMIT_ASorRLIMIT_DATAlimit described ingetrlimit(2). bestie the memory said no π
lc_socketpair() can also fail with any of the errors described in socketpair(2). so like, go read that one too, iykyk.
π₯ SEE ALSO π₯
lc_socket_new(3)lc_channel_new(3)lc_ctx_new(3)lc_socket_setopt(3)setsockopt(2)socket(2)socketpair(2)
and that's the whole page!! π this one's from the LIBRECAST crew, dated 2024-04-08, and it goes by LC_SOCKETPAIR(3) β mwah, go make some socket pairs, you got this πβ¨
π¦ 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 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