diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-01-01 23:53:54 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-01-01 23:54:07 -0800 |
| commit | c0b1557c7931b63435f9d340f5a290556a3cc59c (patch) | |
| tree | dfca6e97f013853fe3831c7f50e38fa3a4a95af2 /docs | |
| parent | 61c886e86de03f89e0c6c1769171576482bf4245 (diff) | |
| download | nng-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')
| -rw-r--r-- | docs/ref/api/ctx.md | 4 | ||||
| -rw-r--r-- | docs/ref/api/sock.md | 13 | ||||
| -rw-r--r-- | docs/ref/migrate/nng1.md | 4 |
3 files changed, 15 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. | + + +> [!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 diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md index 8e418468..960e8626 100644 --- a/docs/ref/migrate/nng1.md +++ b/docs/ref/migrate/nng1.md @@ -145,6 +145,8 @@ and are thus removed: - `nng_ctx_get_string` - `nng_ctx_set_string` +- `nng_ctx_get_uint64` +- `nng_ctx_set_uint64` - `nng_dialer_get_ptr` - `nng_dialer_set_ptr` - `nng_listener_get_ptr` @@ -153,6 +155,8 @@ and are thus removed: - `nng_socket_set_ptr` - `nng_socket_get_string` - `nng_socket_set_string` +- `nng_socket_get_uint64` +- `nng_socket_set_uint64` - `nng_stream_get_ptr` - `nng_stream_set_ptr` - `nng_stream_dialer_get_ptr` |
