NNG_LISTENER_CLOSE(3)
π 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β parameterldoes 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
- ubuntu stonking: libnng-dev 1.12.0-1 Β· MIT OR Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms