sock_opened(3z)
π sock_opened(3z) β like, the z88dk bestie manual π
okay so bestie, we're in the z88dk Programmer's Manual today and the main character of this page is sock_opened. she's a little function, she's got one job, and she does it flawlessly. no cap. β¨
πΈ NAME πΈ
sock_opened β test whether a network connection is established π¦
like... is the socket open or not. that's the whole vibe check. π
π SYNOPSIS π
#include <net/socket.h>
bool_t sock_opened(SOCKET *s);
β¨ DESCRIPTION β¨
so the parameter s is a descriptor to a socket, right? and that socket has to have been made with sock_open(3z) or sock_listen(3z). those are her parents, her origin story, her lore. π
the sock_opened() function tests whether a socket is open β meaning, like, whether the connection to a remote host has been established. is the link up? are we connected? she will tell you. π«Ά
and here's the lil plot twist: a socket of prot_UDP is always established. like always always. it just is. don't question her. π
π RETURN VALUE π
sock_opened() returns TRUE or FALSE. that's it. two options. binary. iconic. she's not giving you a maybe, she's not giving you a spectrum, she's giving you the truth. β
π₯ SEE ALSO π₯
sock_closed(3z)
π AUTHOR π
Dominic Morris <dom@jb.man.ac.uk>
and that's the whole page bestie!! this one's from 18 February 2000 and it lives in the z88dk Programmer's Manual β so like, respect the elders, they were doing sockets before it was cool. π§π
π¦ where this page comes from
- fedora 43: z88dk 1.10.1-33.20150709cvs.fc43 Β· ClArtistic
- fedora 44: z88dk 1.10.1-33.20150709cvs.fc43 Β· ClArtistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms