table of contents
NNG_CTX_SET(3) | NNG Reference Manual | NNG_CTX_SET(3) |
NAME¶
nng_ctx_set - set context option
SYNOPSIS¶
#include <nng/nng.h> int nng_ctx_set(nng_ctx ctx, const char *opt, const void *val, size_t valsz); int nng_ctx_set_bool(nng_ctx ctx, const char *opt, int bval); int nng_ctx_set_int(nng_ctx ctx, const char *opt, int ival); int nng_ctx_set_ms(nng_ctx ctx, const char *opt, nng_duration dur); int nng_ctx_set_size(nng_ctx ctx, const char *opt, size_t z); int nng_ctx_set_string(nng_ctx ctx, const char *opt, const char *str); int nng_ctx_set_uint64(nng_ctx ctx, const char *opt, uint64_t u64);
DESCRIPTION¶
Note
These functions are deprecated. Please see nng_ctx_set.
The nng_ctx_set() functions are used to configure options for the context ctx. The actual options that may be configured in this way vary, and are specified by opt.
Note
Context options are protocol specific.
The details will be documented with the protocol.
Forms¶
The details of the type, size, and semantics of the option will depend on the actual option, and will be documented with the option itself.
nng_ctx_set()
Tip
It may be easier to use one of the typed forms of this function.
nng_ctx_set_bool()
nng_ctx_set_int()
nng_ctx_set_ms()
nng_ctx_set_size()
nng_ctx_set_string()
nng_ctx_set_uint64()
RETURN VALUES¶
These functions return 0 on success, and non-zero otherwise.
ERRORS¶
NNG_ECLOSED
NNG_EINVAL
NNG_ENOTSUP
NNG_EREADONLY
NNG_ESTATE
SEE ALSO¶
nng_ctx_get(3), nng_socket_set(3), nng_strerror(3), nng_ctx(5), nng_options(5), nng_socket(5), nng(7)
2025-02-02 |