SYNOPSIS
#include <nng/nng.h>
#include <nng/supplemental/ipc/ipc.h>
int nng_ipc_getopt(nng_ipc *conn, const char *name, void *data, size_t *sizep);
DESCRIPTION
The nng_ipc_getopt() is used to retrieve the value of the option name for
the IPC connection conn.
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 IPC connections are:
RETURN VALUES
This function returns 0 on success, and non-zero otherwise.
ERRORS
NNG_ECLOSED
|
The connection conn 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. |