sock_shutdown(3z)

πŸ“¦ version 1.10.1, in fedora 43, fedora 44

πŸ’– sock_shutdown(3z) β€” the z88dk girlies' guide to yeeting a socket πŸ’–

okay so bestie, this one lives in the z88dk Programmer's Manual and it's literally the "and that's on periodt, goodbye" of the networking world. it's giving cleanup era. let's get into it 🫢


✨ NAME ✨

sock_shutdown β€” abort a network connection πŸ’€

like, no cap, that's the whole job. the socket is DONE. the connection is cancelled. main character exits stage left. 🌈


✨ SYNOPSIS ✨

#include <net/socket.h>

void sock_close(SOCKET *s);

ngl the synopsis is showing you sock_close up there and not sock_shutdown, which is a little iconic of it, but that's exactly what the page says so we're keeping it, bestie. no editing the lore. πŸ’…


✨ DESCRIPTION ✨

so the parameter s is a descriptor to an open socket that you made with sock_open(3z) or sock_listen(3z). that's the vibe. that's the entry requirement. πŸŽ€

then sock_shutdown() comes in and wipes all trace of the socket s from the system. all of it. gone. not a crumb left. it's giving "we were never here" energy ✨

🚨 real talk though: you should be preceded by either a sock_close(3z) or a sock_abort(3z) depending on the circumstances. like, do the polite close or the dramatic abort FIRST, and then let sock_shutdown() do its thing. iykyk. don't skip the step. πŸ™ˆ

✨ RETURN VALUE ✨

None. that's it. nothing. silence. no return value, no drama, just pure ✨void✨ energy. πŸ’œ


✨ SEE ALSO ✨

  • sock_close(3z) πŸ’–
  • sock_abort(3z) πŸ”₯

✨ AUTHOR ✨

Dominic Morris <dom@jb.man.ac.uk> β€” the actual legend who wrote this. πŸ‘‘ give them their flowers fr fr 🌸


omg and that's the whole page bestie!! this fine piece of documentation is from the z88dk Programmer's Manual, dated 18 February 2000 β€” an absolute vintage icon, and yes, it ate. periodt. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from