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

SYNOPSIS

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

int nng_tls_listener_alloc(nng_tls_listener *lp);

DESCRIPTION

The nng_tls_listener_alloc() allocates a TLS listener, which can be used to accept incoming connections over TLS, and stores a pointer to it it in the location referenced by lp.

RETURN VALUES

This function returns 0 on success, and non-zero otherwise.

ERRORS

NNG_ENOMEM

Insufficient free memory exists.

NNG_ENOTSUP

TLS support not configured in library.

SEE ALSO