aboutsummaryrefslogtreecommitdiff
path: root/docs/ref/api
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-01-01 23:53:54 -0800
committerGarrett D'Amore <garrett@damore.org>2025-01-01 23:54:07 -0800
commitc0b1557c7931b63435f9d340f5a290556a3cc59c (patch)
treedfca6e97f013853fe3831c7f50e38fa3a4a95af2 /docs/ref/api
parent61c886e86de03f89e0c6c1769171576482bf4245 (diff)
downloadnng-c0b1557c7931b63435f9d340f5a290556a3cc59c.tar.gz
nng-c0b1557c7931b63435f9d340f5a290556a3cc59c.tar.bz2
nng-c0b1557c7931b63435f9d340f5a290556a3cc59c.zip
api: remove unused _uint64 options accessors for contexts and sockets
Also, clarification and add socket option docs for MAXRECVSZ, RECONNMINT, RECONNMAXT
Diffstat (limited to 'docs/ref/api')
-rw-r--r--docs/ref/api/ctx.md4
-rw-r--r--docs/ref/api/sock.md13
2 files changed, 11 insertions, 6 deletions
diff --git a/docs/ref/api/ctx.md b/docs/ref/api/ctx.md
index 43d79621..f1157def 100644
--- a/docs/ref/api/ctx.md
+++ b/docs/ref/api/ctx.md
@@ -171,13 +171,11 @@ int nng_ctx_get_bool(nng_ctx ctx, const char *opt, bool *valp);
int nng_ctx_get_int(nng_ctx ctx, const char *opt, int *valp);
int nng_ctx_get_ms(nng_ctx ctx, const char *opt, nng_duration *valp);
int nng_ctx_get_size(nng_ctx ctx, const char *opt, size_t *valp);
-int nng_ctx_get_uint64(nng_ctx ctx, const char *opt, uint64_t *valp);
int nng_ctx_set_bool(nng_ctx ctx, const char *opt, int val);
int nng_ctx_set_int(nng_ctx ctx, const char *opt, int val);
int nng_ctx_set_ms(nng_ctx ctx, const char *opt, nng_duration val);
int nng_ctx_set_size(nng_ctx ctx, const char *opt, size_t val);
-int nng_ctx_set_uint64(nng_ctx ctx, const char *opt, uint64_t val);
```
Some protocols support certain options that affect the behavior of a specific context.
@@ -189,7 +187,7 @@ The `nng_ctx_get_` functions retrieve the value from _ctx_, and store it in the
The `nng_ctx_set_` functions change the value for the _ctx_, taking it from _val_.
These functions access an option as a specific type. The protocol documentation will have details about which options
-are available for contexts, whether they can be read or written, and which type they may be accessed using.
+are available for contexts, whether they can be read or written, and the appropriate type to use.
## Examples
diff --git a/docs/ref/api/sock.md b/docs/ref/api/sock.md
index 88242721..0fef92e0 100644
--- a/docs/ref/api/sock.md
+++ b/docs/ref/api/sock.md
@@ -278,13 +278,11 @@ int nng_socket_get_bool(nng_socket s, const char *opt, bool *valp);
int nng_socket_get_int(nng_socket s, const char *opt, int *valp);
int nng_socket_get_ms(nng_socket s, const char *opt, nng_duration *valp);
int nng_socket_get_size(nng_socket s, const char *opt, size_t *valp);
-int nng_socket_get_uint64(nng_socket s, const char *opt, uint64_t *valp);
int nng_socket_set_bool(nng_socket s, const char *opt, int val);
int nng_socket_set_int(nng_socket s, const char *opt, int val);
int nng_socket_set_ms(nng_socket s, const char *opt, nng_duration val);
int nng_socket_set_size(nng_socket s, const char *opt, size_t val);
-int nng_socket_set_uint64(nng_socket s, const char *opt, uint64_t val);
```
Protocols usually have protocol specific behaviors that can be adjusted via options.
@@ -306,12 +304,21 @@ The following options are available for many protocols, and always use the same
| Option | Type | Description |
| --------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------- |
+| `NNG_OPT_RECONNMAXT` | `nng_duration` | Maximum time [dialers][dialer] will delay before trying after failing to connect. |
+| `NNG_OPT_RECONNMINT` | `nng_duration` | Minimum time [dialers][dialer] will delay before trying after failing to connect. |
| `NNG_OPT_RECVBUF`<a name="NNG_OPT_RECVBUF"></a> | `int` | Maximum number of messages to buffer locally when receiving. |
-| `NNG_OPT_SENDBUF`<a name="NNG_OPT_SENDBUF"></a> | `int` | Maximum number of messages to buffer when sending messages. |
| `NNG_OPT_RECVMAXSZ`<a name="NNG_OPT_RECVMAXSZ"></a> | `size_t` | Maximum message size acceptable for receiving. Can be tuned independently on [dialers][dialer] and [listeners][listener]. |
| `NNG_OPT_RECVTIMEO`<a name="NNG_OPT_RECVTIMEO"></a> | `nng_duration` | Default timeout (ms) for receiving messages. |
+| `NNG_OPT_SENDBUF`<a name="NNG_OPT_SENDBUF"></a> | `int` | Maximum number of messages to buffer when sending messages. |
| `NNG_OPT_SENDTIMEO`<a name="NNG_OPT_SENDTIMEO"></a> | `nng_duration` | Default timeout (ms) for sending messages. |
+&nbsp;
+
+> [!NOTE]
+> The `NNG_OPT_RECONNMAXT`, `NNG_OPT_RECONNMINT`, and `NNG_OPT_RECVMAXSZ` options are just the initial defaults that [dialers][dialer]
+> (and for `NNG_OPT_RECVMAXSZ` also [listeners][listener])
+> will use. After the dialer or listener is created, changes to the socket's value will have no affect on that dialer or listener.
+
## Polling Socket Events
```c