aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/ref/proto/sub.md32
1 files changed, 4 insertions, 28 deletions
diff --git a/docs/ref/proto/sub.md b/docs/ref/proto/sub.md
index bd8df577..dd9e0363 100644
--- a/docs/ref/proto/sub.md
+++ b/docs/ref/proto/sub.md
@@ -30,36 +30,12 @@ Only version 0 of this protocol is supported.
### Protocol Options
-The following protocol-specific options are available.
-
-- {{i:`NNG_OPT_SUB_SUBSCRIBE`}}{{hi:subscribe}}: \
- \
- This option registers a topic that the subscriber is interested in.
- The option is write-only, and takes an array of bytes, of arbitrary size.
- Each incoming message is checked against the list of subscribed topics.
- If the body begins with the entire set of bytes in the topic, then the
- message is accepted. If no topic matches, then the message is
- discarded. \
- \
- This option is a byte array. Thus if you use
- [`nng_socket_set_string`][nng_socket_set] the `NUL` terminator byte will
- be included in the topic.
- If that isn't desired, consider using
- [`nng_socket_set`][nng_socket_set] and using `strlen` of the topic
- as the topic size. \
- \
- To receive all messages, an empty topic (zero length) can be used.
-
-- {{i:`NNG_OPT_SUB_UNSUBSCRIBE`}}: \
- \
- This option, also read-only, removes a topic from the subscription list.
- Note that if the topic was not previously subscribed to with
- `NNG_OPT_SUB_SUBSCRIBE` then an `NNG_ENOENT` error will result.
+The following protocol-specific option is available.
- {{i:`NNG_OPT_SUB_PREFNEW`}}: \
- (`bool`) \
- \
- This read/write option specifies the behavior of the subscriber when the queue is full.
+ (`bool`) \
+ \
+ This read/write option specifies the behavior of the subscriber when the queue is full.
When `true` (the default), the subscriber will make room in the queue by removing the oldest message.
When `false`, the subscriber will reject messages if the message queue does not have room.