NNG_STREAM_LISTENER_FREE(3str)

πŸ“¦ version 1.11, in alpine 3.24

✨ NNG_STREAM_LISTENER_FREE ✨

okay so this is a page from the NNG Reference Manual (section 3str, bestie, that's the streams chapter πŸ’…), and it's about one very specific little function that does one very specific little thing: it frees a byte stream listener. that's it. that's the whole vibe. let's get into it 🫢


🌸 NAME 🌸

nng_stream_listener_free β€” free byte stream listener

like, it releases the listener. the whole function. iconic behaviour honestly πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <nng/nng.h>

void nng_stream_listener_free(nng_stream_listener *)l;

yes that's the literal signature, no i did not touch it, copy it exactly into your code and go off πŸ’œ


πŸ”₯ DESCRIPTION πŸ”₯

okay so nng_stream_listener_free() does two things and they're lowkey a package deal: it closes the byte stream listener l you hand it, and then it frees the underlying resources associated with it. bye bye, resources, you will not be missed ✨

and here's the part where you need to pay attention, bestie, because if you have any accept operations in progress that are using l, they are not just gonna quietly finish β€” they get terminated with an NNG_ECLOSED error condition. so yeah, they're done, closed, wrapped up, curtain call 😭

⚠️ Warning β€” it is super important that the application make sure no further accesses are made to l after this. the memory backing it will be reclaimed for other uses. like, it's not yours anymore. don't call it. don't peek at it. don't text it back. it's gone πŸ’€ this is genuinely the part where people get hurt so please respect it.

πŸŽ€ RETURN VALUES πŸŽ€

None. nothing. void. it returns the void and the void is at peace 🧚


πŸ’€ ERRORS πŸ’€

None. no error codes, no drama, no nothing. it just does the thing ✨


🌈 SEE ALSO 🌈

go read these too, iykyk πŸ‘‘


that's the whole page, bestie, you ate it up fr fr πŸŒΈπŸ’– this was the NNG Reference Manual, dated 2026-01-13 β€” go free those listeners responsibly and drink some water 🫢✨

πŸ“¦ where this page comes from