Manpage logo

nng_stream_listener_accept - accept incoming byte stream connection

NAME  SYNOPSIS  DESCRIPTION  RETURN VALUES  ERRORS  SEE ALSO 

NAME

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

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().

RETURN VALUES

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.

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)


Updated 2026-06-01 - jenkler.se | uex.se