diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-09 12:54:50 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-11-09 12:54:50 -0800 |
| commit | 1c32463e43c1a7ab2f0f2c7a7b83812aacddf40c (patch) | |
| tree | 392ebfe828cd03c07f457f4ec09078f1f4cbcc65 /docs/ref/proto | |
| parent | bf01b3138b7e9ff109601a33627d8deee6906f20 (diff) | |
| download | nng-1c32463e43c1a7ab2f0f2c7a7b83812aacddf40c.tar.gz nng-1c32463e43c1a7ab2f0f2c7a7b83812aacddf40c.tar.bz2 nng-1c32463e43c1a7ab2f0f2c7a7b83812aacddf40c.zip | |
Remove references to NNG_OPT_SUB_SUBSCRIBE.
Diffstat (limited to 'docs/ref/proto')
| -rw-r--r-- | docs/ref/proto/sub.md | 32 |
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. |
