NNG_STREAM_LISTENER_ACCEPT(3str)
π NAME π
okay so this is the NNG_STREAM...NER_ACCEPT(3str) page from the NNG Reference Manual, and yes bestie, it's all about accepting connections π
nng_stream_listener_accept β accept incoming byte stream connection.
β¨ SYNOPSIS β¨
#include <nng/nng.h>
void nng_stream_listener_accept(nng_stream_listener *l, nng_aio *aio);
πΈ DESCRIPTION πΈ
okay so nng_stream_listener_accept() is the move where you attempt to accept an incoming byte stream connection from a remote peer, using the listener l. The operation is completed asynchronously, using aio β that's the async part, and it's doing the most. π
This operation can only be done after the listener is already listening. No skipping steps, bestie.
If a connection is successfully established, the aio will have the resulting nng_stream object stored as its first output, which can be retrieved with nng_aio_get_output(). iconic. β¨
π«Ά RETURN VALUES π«Ά
None. literally none. π
π ERRORS π
NNG_ECANCELEDβ the operation was aborted.NNG_ECLOSEDβ the listener is closed.NNG_ECONNRESETβ the connection was reset by the peer.NNG_ENOMEMβ insufficient free memory exists.NNG_ESTATEβ the listener is not not listening. (yes, "not not" is exactly what the page says; I'm just the messenger π)
π SEE ALSO π
nng_strerror(3)nng_stream_listener_alloc(3str)nng_stream_listener_close(3str)nng_stream_listener_free(3str)nng_stream_listener_listen(3str)nng_aio(5)nng_stream(5)nng_stream_listener(5)
okay bestie, that's the whole page β NNG Reference Manual, dated 2026-01-13, page name NNG_STREAM...NER_ACCEPT(3str). byeeee π«Άβ¨
π¦ 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