From 2f6c090c92a563f1a92329810675fb49f3105cc3 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 2 Jan 2025 00:20:28 -0800 Subject: docs: document NNG_OPT_MAXTTL, other cleanups --- docs/man/nng_options.5.adoc | 52 --------------------------------------------- docs/ref/api/sock.md | 19 +++++++++-------- docs/ref/xref.md | 10 +++------ 3 files changed, 13 insertions(+), 68 deletions(-) (limited to 'docs') diff --git a/docs/man/nng_options.5.adoc b/docs/man/nng_options.5.adoc index 6dc6154a..8a8e43ec 100644 --- a/docs/man/nng_options.5.adoc +++ b/docs/man/nng_options.5.adoc @@ -42,10 +42,6 @@ nng_options - socket, dialer, listener, and pipe options This page documents the various standard options that can be set or retrieved on objects. -Sockets (xref:nng_socket.5.adoc[`nng_socket`] objects) use the functions -xref:nng_socket_get.3.adoc[`nng_socket_get()`] -and xref:nng_socket_set.3.adoc[`nng_socket_set()`] to set and retrieve option values. - Dialers (xref:nng_dialer.5.adoc[`nng_dialer`] objects) use the functions xref:nng_dialer_get.3.adoc[`nng_dialer_get()`] and xref:nng_dialer_set.3.adoc[`nng_dialer_set()`] to set and retrieve option @@ -89,22 +85,6 @@ address that will be used when initiating outgoing connections. The specific port number will be ignored, however, and the system will choose a random ephemeral port instead. -[[NNG_OPT_RAW]] -((`NNG_OPT_RAW`)):: -(((raw mode))) -(((cooked mode))) -(`bool`) -This read-only option indicates whether the socket is in raw mode. -If `true`, the socket is in raw mode, and if `false` the socket is -in normal mode. -+ -Raw mode sockets generally do not have any protocol-specific semantics applied -to them; instead the application is expected to perform such semantics itself. -(For example, in normal mode a xref:nng_rep.7.adoc[_rep_] socket would -automatically copy message headers from a received message to the corresponding -reply, whereas in raw mode this is not done.) -See xref:nng.7.adoc#raw_mode[Raw Mode] for more details. - [[NNG_OPT_RECONNMINT]] ((`NNG_OPT_RECONNMINT`)):: (((reconnect time, minimum))) @@ -172,14 +152,6 @@ are established.) + NOTE: Some transports may have further message size restrictions. -[[NNG_OPT_RECVTIMEO]] -((`NNG_OPT_RECVTIMEO`)):: -(((receive, timeout))) -(((timeout, receive))) -(xref:nng_duration.5.adoc[`nng_duration`]) -This is the socket receive timeout in milliseconds. -When no message is available for receiving at the socket for this period of -time, receive operations will fail with a return value of `NNG_ETIMEDOUT`. [[NNG_OPT_REMADDR]] ((`NNG_OPT_REMADDR`)):: @@ -188,30 +160,6 @@ This read-only option may be used on dialers and connected pipes, and represents the address of a remote peer. Not all transports support this option. -[[NNG_OPT_SENDBUF]] -((`NNG_OPT_SENDBUF`)):: -(((send, buffer))) -(((buffer, send))) -(`int`) -This is the depth of the socket send buffer as a number of messages. -Messages sent by an application may be buffered by the socket until a -transport is ready to accept them for delivery. -This value must be an integer between 0 and 8192, inclusive. -+ -NOTE: Not all protocols support buffering sent messages. -For example, xref:nng_req.7.adoc[_req_] can only have a single request -outstanding at a time (per context). - -[[NNG_OPT_SENDTIMEO]] -((`NNG_OPT_SENDTIMEO`)):: -(((send, timeout))) -(((timeout, send))) -(xref:nng_duration.5.adoc[`nng_duration`]) -This is the socket send timeout in milliseconds. -When a message cannot be queued for delivery by the socket for this period of -time (such as if send buffers are full), the operation will fail with a -return value of `NNG_ETIMEDOUT`. - [[NNG_OPT_MAXTTL]] ((`NNG_OPT_MAXTTL`)):: (`int`) diff --git a/docs/ref/api/sock.md b/docs/ref/api/sock.md index 0fef92e0..ea1eac0a 100644 --- a/docs/ref/api/sock.md +++ b/docs/ref/api/sock.md @@ -302,15 +302,16 @@ are available, whether they can be read or written, and the appropriate type to The following options are available for many protocols, and always use the same types and semantics described below. -| 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` | `int` | Maximum number of messages to buffer locally when receiving. | -| `NNG_OPT_RECVMAXSZ` | `size_t` | Maximum message size acceptable for receiving. Can be tuned independently on [dialers][dialer] and [listeners][listener]. | -| `NNG_OPT_RECVTIMEO` | `nng_duration` | Default timeout (ms) for receiving messages. | -| `NNG_OPT_SENDBUF` | `int` | Maximum number of messages to buffer when sending messages. | -| `NNG_OPT_SENDTIMEO` | `nng_duration` | Default timeout (ms) for sending messages. | +| Option | Type | Description | +| ----------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `NNG_OPT_MAXTTL` | `int` | Maximum number of traversals across an [`nng_device`] device. | +| `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` | `int` | Maximum number of messages to buffer locally when receiving. | +| `NNG_OPT_RECVMAXSZ` | `size_t` | Maximum message size acceptable for receiving. Can be tuned independently on [dialers][dialer] and [listeners][listener]. | +| `NNG_OPT_RECVTIMEO` | `nng_duration` | Default timeout (ms) for receiving messages. | +| `NNG_OPT_SENDBUF` | `int` | Maximum number of messages to buffer when sending messages. | +| `NNG_OPT_SENDTIMEO` | `nng_duration` | Default timeout (ms) for sending messages. |   diff --git a/docs/ref/xref.md b/docs/ref/xref.md index cfc9cbc3..f8d35fbb 100644 --- a/docs/ref/xref.md +++ b/docs/ref/xref.md @@ -198,10 +198,6 @@ [`nng_dialer_get_tls`]: /TODO.md [`nng_listener_set_tls`]: /TODO.md [`nng_listener_get_tls`]: /TODO.md -[`nng_stream_dialer_set_tls`]: /TODO.md -[`nng_stream_dialer_get_tls`]: /TODO.md -[`nng_stream_listener_set_tls`]: /TODO.md -[`nng_stream_listener_get_tls`]: /TODO.md [`nng_opts_parse`]: /api/cmd_opts.md#parse-command-line-options [`nng_aio_finish`]: /TODO.md [`nng_aio_reset`]: /TODO.md @@ -302,9 +298,9 @@ [`NNG_UNIT_EVENTS`]: /api/stats.md#statistic-units [`NNG_FLAG_NONBLOCK`]: /TODO.md [`NNG_OPT_LISTEN_FD`]: /api/streams.md#socket-activation -[`NNG_OPT_MAXTTL`]: /TODO.md -[`NNG_OPT_RECONNMAXT`]: /TODO.md -[`NNG_OPT_RECONNMINT`]: /TODO.md +[`NNG_OPT_MAXTTL`]: /api/sock.md#NNG_OPT_MAXTTL +[`NNG_OPT_RECONNMAXT`]: /api/sock.md#NNG_OPT_RECONNMAXT +[`NNG_OPT_RECONNMINT`]: /api/sock.md#NNG_OPT_RECONNMINT [`NNG_OPT_SENDTIMEO`]: /api/sock.md#NNG_OPT_SENDTIMEO [`NNG_OPT_RECVTIMEO`]: /api/sock.md#NNG_OPT_RECVTIMEO [`NNG_OPT_SENDBUF`]: /api/sock.md#NNG_OPT_SENDBUF -- cgit v1.2.3-70-g09d2