From 1c32463e43c1a7ab2f0f2c7a7b83812aacddf40c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 9 Nov 2024 12:54:50 -0800 Subject: Remove references to NNG_OPT_SUB_SUBSCRIBE. --- docs/ref/proto/sub.md | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'docs/ref/proto') 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. -- cgit v1.2.3-70-g09d2