This documentation is for the TIP (development tree) of NNG and may represent unreleased changes or functionality that is experimental, and is subject to change before release. The latest released version is v1.3.2. See the documentation for v1.3.2 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