nng_stream_listener_accept − accept incoming byte stream connection
#include <nng/nng.h>
void nng_stream_listener_accept(nng_stream_listener *l, nng_aio *aio);
The nng_stream_listener_accept() attempts to accept an incoming byte stream connection from a remote peer, using the listener l. The operation is completed asynchronously, using aio.
This operation can only be done after the listener is already listening.
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().
None.
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.
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)