socket_tcp6(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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 πŸ’œ


kisses, this was page socket_tcp6(3) of the Library Functions Manual, footer and all β€” mwah πŸ’‹βœ¨