summaryrefslogtreecommitdiff
path: root/docs/ref/old/nng_getopt.adoc
blob: 4f34b9fda882cd6766d0ed0fb41f5650d4edbc84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
## nng_getopt

Get socket option (deprecated).

### Synopsis

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

int nng_getopt(nng_socket s, const char *opt, void *val, size_t *valszp);
int nng_getopt_bool(nng_socket s, const char *opt, bool *bvalp);
int nng_getopt_int(nng_socket s, const char *opt, int *ivalp);
int nng_getopt_ms(nng_socket s, const char *opt, nng_duration *durp);
int nng_getopt_ptr(nng_socket s, const char *opt, void **ptr);
int nng_getopt_size(nng_socket s, const char *opt, size_t *zp);
int nng_getopt_string(nng_socket s, const char *opt, char **strp);
int nng_getopt_uint64(nng_socket s, 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_getopt` | `nng_socket_get`
| `nng_getopt_bool`| `nng_socket_get_bool`
| `nng_getopt_int`| `nng_socket_get_int`
| `nng_getopt_ms`| `nng_socket_get_ms`
| `nng_getopt_ptr`| `nng_socket_get_ptr`
| `nng_getopt_size`| `nng_socket_get_size`
| `nng_getopt_string`| `nng_socket_get_string`
| `nng_getopt_uint64`| `nng_socket_get_uint64`
|===

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

### See Also

xref:../sock/nng_socket_get.adoc[nng_socket_get]