This documentation is for version v1.7.3 of NNG, but the latest released version is v1.8.0. see the documentation for v1.8.0 for the most up-to-date information.

nng_stream_listener_accept(3str)

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