socket_sctp6(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_sctp6 β€” bestie, let's build a socket πŸ’–

okay so real talk, this page lives in the Library Functions Manual section 3, and it's called socket_sctp6(3). it's giving "networking but make it IPv6 and SCTP". let's get into it πŸ¦‹


✨ NAME ✨

socket_sctp6 β€” bestie it literally creates a non-blocking IPv6 SCTP/IP stream socket. that's the whole vibe. πŸ‘‘


✨ SYNTAX ✨

#include <libowfat/socket.h>

int socket_sctp6();

that's it. that's the whole incantation. no arguments, no drama, just a function call waiting to happen πŸŽ€


✨ DESCRIPTION ✨

so socket_sctp6 creates a non-blocking IPv6 SCTP/IP stream socket, and hands you back a file descriptor pointing right at that socket. it's like a little key to your brand new socket, and you're the main character holding it πŸ”‘

and if something goes wrong? not to worry, she's honest about it: socket_sctp6 returns -1, sets errno appropriately, and doesn't allocate any resources while doing it. so like, no leaked mess, no half-built socket haunting you. clean exit, no crumbs, we love a graceful failure πŸ’…


✨ EXAMPLE ✨

here's how you'd actually use her, fr fr:

#include <libowfat/socket.h>

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

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

look at that flow: grab the socket, bind it to ip and p, then connect it right back out on ip, p, with that trailing 0. chef's kiss, no notes 😭πŸ”₯


✨ SEE ALSO ✨

go read the siblings, they're iconic too:


ngl if you got this far you're lowkey a Unix girlie now. proud of you. 🫢

okay that's the whole page bestie, no cap, every detail intact. this was the socket_sctp6(3) page from the Library Functions Manual β€” footer says socket_sctp6(3), same name, same energy, same little corner of the manual. mwah, go write some sockets πŸ’–βœ¨πŸŒˆ