socket_tcp6b(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

socket_tcp6b(3) πŸ’–

okay bestie, welcome to the Library Functions Manual β€” yes that's the whole manual, and yes you're about to be so good at IPv6 sockets. grab a strawberry πŸ“ and let's go.


✨ NAME ✨

socket_tcp6b β€” makes you a blocking IPv6 TCP/IP stream socket, no cap πŸ‘‘


✨ SYNTAX ✨

#include <libowfat/socket.h>

int socket_tcp6b();

like it literally takes zero arguments. she's low maintenance fr fr πŸ’…


✨ DESCRIPTION ✨

so socket_tcp6b creates a blocking IPv6 TCP/IP stream socket and hands you back a file descriptor pointing right at it. that's it, that's the whole job, and she ate πŸŽ€

but listen β€” if something goes wrong, socket_tcp6b returns -1 and sets errno appropriately. and the cute part? it does that without allocating any resources. no leaked fds, no mess, just a clean little L. we love an honest failure 😭✨


✨ EXAMPLE ✨

here's the vibe, copy-paste energy only:

#include <libowfat/socket.h>

int s;
char ip[16];
uint16 p;

s = socket_tcp6b();
socket_bind6(s,ip,p);
socket_connect6(s,ip,p,0);

bind first, connect after β€” the order is giving main character energy and honestly? correct πŸ¦‹


✨ SEE ALSO ✨

go read those too, iykyk πŸ“š


real talk bestie: -1 means check your errno, don't just stare at it πŸ’€

okay that's the whole page, you're literally an IPv6 girlie now 🌈

signing off from the Library Functions Manual β€” this was socket_tcp6b(3), mwah, take care of her 🫢🌸