--- version: tip layout: refman --- nng_tls_listener_accept(3tls)

SYNOPSIS

#include <nng/nng.h>
#include <nng/supplemental/tls/tls.h>

void nng_tls_listener_accept(nng_tls_listener *l, nng_aio *aio);

DESCRIPTION

The nng_tls_listener_accept() attempts to accept an incoming TLS 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 bound to a TCP port and is listening.

If a connection is successfully established, the aio will have the resulting nng_tls stored as its first output. (See nng_aio_get_output().)

The address of the remote peer can be determined using the NNG_OPT_REMADDR option with the nng_tls_getopt() function on the returned nng_tls.

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