NNG_STREAM_LISTENER_FREE(3str)
β¨ 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 π
nng_strerror(3)nng_stream_listener_accept(3str)nng_stream_listener_alloc(3str)nng_stream_listener_close(3str)nng_stream_listener(5)
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
- alpine 3.24: nng-doc 1.11-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms