socket_sctp4(3)
π socket_sctp4 β bestie edition π
okay so this one lives in the Library Functions Manual, and it's a lil function from libowfat called socket_sctp4, and I need you to know it's iconic before we even get into it. sit down, grab a boba, we're doing sockets π§β¨
πΈ NAME πΈ
socket_sctp4 β makes you a non-blocking SCTP/IP stream socket π¦
like. it literally just. spawns one. for you. no cap.
β¨ SYNTAX β¨
#include <libowfat/socket.h>
int socket_sctp4();
that's it bestie, no arguments, no nothing, she takes zero parameters and she serves π
π DESCRIPTION π
so here's the tea: socket_sctp4 creates a non-blocking SCTP/IP stream socket, and it hands you back a file descriptor pointing right at it. that fd is your new best friend, treat her well π«Ά
and if something goes wrong? if the universe simply said "not today"? then socket_sctp4 returns -1, sets errno appropriately so you know exactly what went down, and β this is the important part β it does all that without allocating any resources. no leaked anything. clean exit. we love a function that doesn't leave a mess behind πβ¨
ngl, always check that return value.-1means go readerrno, periodt.
π EXAMPLE π
here's how the girlies actually use her:
#include <libowfat/socket.h>
int s;
char ip[4];
uint16 p;
s = socket_sctp4();
socket_bind4(s,ip,p);
socket_connect4(s,ip,p);
make the socket, bind her to an address, connect her to a peer. the full main character arc, start to finish π
π₯ SEE ALSO π₯
go read those too, iykyk π
that's the whole page bestie!! this was socket_sctp4(3) from the Library Functions Manual, and yes she ate and left no crumbs. mwah, go build something cute ππ
π¦ 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