NNG_LISTENER_CLOSE(3)

πŸ“¦
version 1.12.0 Β· 4 versions
, in ubuntu stonking

πŸ’– NNG_LISTENER_CLOSE(3) πŸ’–

okay bestie, welcome to the NNG Reference Manual, listener-close edition. this is nng_listener_close and she's here to shut things down, cleanly, no drama. πŸŽ€


✨ NAME ✨

nng_listener_close β€” close listener


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <nng/nng.h>

int nng_listener_close(nng_listener l);

🌸 DESCRIPTION 🌸

so the nng_listener_close() function closes the listener l. and not just the listener itself β€” it also closes any pipes that have been created by the listener. whole friend group, gone. πŸ’…

the moment this function returns, the listener l and every single one of its resources are deallocated. so like… it's an error to try and access l after this function has returned. it's giving "she's not coming back, move on". (and if you do try? attempts to do so will result in NNG_ECLOSED errors. 😭)

bestie pls remember: listeners are implicitly closed when the socket they are associated with is closed. so sometimes she dips on her own, no warning, iconic behavior of her honestly. πŸ™ˆ

⭐ RETURN VALUES ⭐

this function returns 0 on success, and non-zero otherwise. simple as that, no cap. ✨


πŸ’€ ERRORS πŸ’€

  • NNG_ECLOSED β€” parameter l does not refer to an open listener. yeah she's already gone, bestie. 🫢

🌈 SEE ALSO 🌈

nng_close(3), nng_listen(3), nng_listener_create(3) nng_strerror(3), nng_listener(5), nng(7)


and that's the whole page! this was the NNG Reference Manual, dated 2026-06-30, and you have officially read NNG_LISTENER_CLOSE(3). slay, go close some listeners responsibly. πŸ’–βœ¨πŸ§š

πŸ“¦ where this page comes from