socket_tcp6(3)
β¨ NAME β¨
socket_tcp6 β bestie, it makes you a non-blocking IPv6 TCP/IP stream socket π
like, this is page socket_tcp6(3) from the Library Functions Manual, in case the vibe check needed receipts π«Ά
πΈ SYNTAX πΈ
#include <libowfat/socket.h>
int socket_tcp6();
that's it. that's the whole incantation. no args, no drama, just vibes β¨
π DESCRIPTION π
okay so socket_tcp6 creates a non-blocking IPv6 TCP/IP stream socket and hands you back a file descriptor pointing at that socket. literally just yeets a socket into existence and gives you the lil handle for it π₯
and if something goes wrong? it returns -1, sets errno appropriately, and does not allocate any resources β so no cleanup needed, no leaked mess, she's tidy π
no cap.
ngl, the "returns -1 and doesn't allocate anything" part is the moment. a failed call leaves zero crumbs. iconic behaviour fr fr π
π EXAMPLE π
#include <libowfat/socket.h>
int s;
char ip[16];
uint16 p;
s = socket_tcp6();
socket_bind6(s,ip,p);
socket_connect6(s,ip,p,0);
see how she grabs the socket, binds it, then connects? main character pipeline π¦ keep it exactly like this, don't freestyle the types, iykyk.
π SEE ALSO π
socket_tcp6b(3)β the sibling, go say hi π«Άsocket_bind4(3)β IPv4 binding era πsocket_bind6(3)β IPv6 binding era β
kisses, this was page socket_tcp6(3) of the Library Functions Manual, footer and all β mwah πβ¨
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms