socket_acc...onblocking(3)
π socket_acc...onblocking(3) π
okay bestie, welcome to the Library Functions Manual, we're doing a lil deep dive today β¨
π NAME π
socket_accept6_makenonblocking β accept an IPv6 TCP connection on a socket π¦
πΈ SYNTAX πΈ
#include <libowfat/socket.h>
int socket_accept6_makenonblocking(int s,char ip[16],uint16 *port,uint32
*scope_id);
β¨ DESCRIPTION β¨
so like, this function is functionally equivalent to calling socket_accept4 and then calling ndelay_on on the socket you just got back. same energy, same result π
BUT β and this is the slay part β it may save you a syscall or two, and in the process it avoids a race condition. so it's giving "same thing but smarter" π no cap.
π EXAMPLE π
here's the vibe, fr fr:
#include <libowfat/socket.h>
int s;
char ip[16];
uint16 port;
uint32 scope_id;
s = socket_tcp6();
socket_bind6(s,ip,port,scope_id);
socket_listen(s,16);
socket_accept6_makenonblocking(s,ip,&port,&scope_id);
look at her go ππ
π SEE ALSO π
go read these next, they're iconic:
socket_accept6(3)socket_connected(3)socket_accept4_makenonblocking(3)socket_accept6_setcloseonexec(3)socket_accept6_makenonblocking_setcloseonexec(3)
and that's the whole page bestie, we ate and left no crumbs π
and yeah, the footer said socket_acc...onblocking(3) and honestly? she's right, she ate too. same name, same page, same Library Functions Manual energy. mwah ππ§
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· 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 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