SYNOPSIS
#include <nng/nng.h>
#include <nng/supplemental/tls/tls.h>
int nng_tls_getopt(nng_tls_dialer *d, const char *name, void *data, size_t *sizep);
DESCRIPTION
The nng_tls_dialer_getopt() is used to retrieve the value of the option name
for the TLS dialer d.
The size of the buffer located at data to receive the copy is passed by the
caller at the location referenced by sizep.
If this size is sufficient to hold the entire object, the object is copied into
the buffer specified by data.
In either event, the size of the source object (the amount of data copied,
or that would have been copied if sufficient space were available) is stored
at the location of sizep.
Options
The options specifically suppported for retrieval from TLS dialers are:
RETURN VALUES
This function returns 0 on success, and non-zero otherwise.
ERRORS
NNG_ECLOSED
|
The dialer is closed. |
NNG_EINVAL
|
There was insufficient space to receive the object. The amount of data actually needed is returned in sizep. |
NNG_ENOTSUP
|
The option name is not supported. |
NNG_EWRITEONLY
|
The option name may not read. |