SYNOPSIS
#include <nng/nng.h>
#include <nng/supplemental/tls/tls.h>
void nng_tls_free(nng_tls *conn);
DESCRIPTION
The nng_tls_free() function closes the supplied TLS connection, conn,
and frees the underlying resources associated with it.
If any operations are pending (such as nng_tls_send()
or nng_tls_recv() they will be terminated with
an NNG_ECLOSED error condition.
| It is important that the application ensure that no further accesses are made to conn, as the memory backing it will be reclaimed for other uses. |
| Closing the connection while data is in transmission will likely lead to loss of that data. There is no automatic linger or flush to ensure that the socket send buffers have completely transmitted. |
RETURN VALUES
None.
ERRORS
None.