SYNOPSIS
#include <nng/nng.h>
#include <nng/supplemental/tls/tls.h>
void nng_tls_dialer_dial(nng_tls_dialer *d, const nng_sockaddr *sa, nng_aio *aio);
DESCRIPTION
The nng_tls_dialer_dial() attempts to establish a TLS connection to the
remote peer identified by sa, using the dialer d.
The operation is completed asynchronously, using aio.
The address sa must be in the NNG_AF_INET or NNG_AF_INET6 families,
and have a valid IPv4 or IPv6 address and TCP port number.
If a connection is successfully established, the aio will have the
resulting nng_tls stored as its first output.
(See nng_aio_get_output().)
RETURN VALUES
None.
ERRORS
NNG_EADDRINVAL
|
The address specified is invalid. |
NNG_ECANCELED
|
The operation was aborted. |
NNG_ECLOSED
|
The dialer is closed. |
NNG_ECONNREFUSED
|
The connection was refused by the server. |
NNG_ECONNRESET
|
The connection was reset by the server. |
NNG_ECRYPTO
|
Cryptographic or certificate validation error. |
NNG_ENOMEM
|
Insufficient free memory exists. |