## nng_ctx_getopt

Get context option (deprecated).

### Synopsis

```c
#include <nng/nng.h>

int nng_ctx_getopt(nng_ctx ctx, const char *opt, void *val, size_t *valszp);
int nng_ctx_getopt_bool(nng_ctx ctx, const char *opt, bool *bvalp);
int nng_ctx_getopt_int(nng_ctx ctx, const char *opt, int *ivalp);
int nng_ctx_getopt_ms(nng_ctx ctx, const char *opt, nng_duration *durp);
int nng_ctx_getopt_size(nng_ctx ctx, const char *opt, size_t *zp);
int nng_ctx_getopt_string(nng_ctx ctx, const char *opt, char **strp);
int nng_ctx_getopt_uint64(nng_ctx ctx, const char *opt, uint64_t *u64p);
```

### Description

NOTE: These functions are deprecated.
They may not be present if the library was built with ((`NNG_ELIDE_DEPRECATED`)).

These deprecated functions have one-to-one modern equivalents with the same arguments and semantics, as follows:

[width=50%,]
|===
| Legacy Function | Modern Equivalent

| `nng_ctx_getopt` | `nng_ctx_get`
| `nng_ctx_getopt_bool`| `nng_ctx_get_bool`
| `nng_ctx_getopt_int`| `nng_ctx_get_int`
| `nng_ctx_getopt_ms`| `nng_ctx_get_ms`
| `nng_ctx_getopt_size`| `nng_ctx_get_size`
| `nng_ctx_getopt_string`| `nng_ctx_get_string`
| `nng_ctx_getopt_uint64`| `nng_ctx_get_uint64`
|===

Please see the documentation for the modern equivalents for more detail.

### See Also

xref:../ctx/nng_ctx_get.adoc[nng_ctx_get]
