sock_puts(3z)
π sock_puts(3z) β bestie edition π
okay so this page lives in the z88dk Programmer's Manual and it's literally all about yeeting a whole string at a network socket. no cap. let's get into it π¦
β¨ NAME β¨
sock_write β write string to a network socket
not me pointing out that the NAME section sayssock_writewhile the function itself issock_putsβ¦ that's just how it is, bestie, and we respect the lore π«Ά
πΈ SYNOPSIS πΈ
#include <net/socket.h>
size_t sock_puts(SOCKET *s, char *dp);
π DESCRIPTION π
so the parameter s? that's a descriptor to an open socket, and you get one of those from sock_open(3z) or sock_listen(3z). iconic behaviour honestly.
the sock_puts() function writes the NULL terminated string dp to the socket specified by s. that's the whole vibe. one call, string goes out, main character energy. β¨
π RETURN VALUE π
the sock_write() function returns the number of bytes written to the socket. slay.
but if you supply an illegal socket? π the carry flag will be set and the return value will be EPROTONOSUPPORT. so likeβ¦ vibe check failed, protect your peace, check that socket before you send.
π¦ SEE ALSO π¦
sock_write(3z)sock_putc(3z)
π AUTHOR π
Dominic Morris <dom@jb.man.ac.uk>
18 February 2000 β that's the date, that's the version stamp, and that's the little sock_puts(3z) footer energy right there. tysm for reading, go write to a socket responsibly, mwah ππ
π¦ 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