summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-09 09:25:22 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-11 10:31:44 -0800
commit3163a56e06a58abb10c753fc77da388234d580c2 (patch)
treea35a02af1590d94cedb5fbcaef7de535d8e5b73e /include
parent18d7519234f456a487623d93bcb6daa121d0ce17 (diff)
downloadnng-3163a56e06a58abb10c753fc77da388234d580c2.tar.gz
nng-3163a56e06a58abb10c753fc77da388234d580c2.tar.bz2
nng-3163a56e06a58abb10c753fc77da388234d580c2.zip
Add nng_sub0_subscribe and friends.
These are new functions that replace `NNG_OPT_SUBSCRIBE` and `NNG_OPT_UNSUBSCRIBE`. They are provided here as a transition aid before those options are removed in NNG 2.0.
Diffstat (limited to 'include')
-rw-r--r--include/nng/protocol/pubsub0/sub.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/nng/protocol/pubsub0/sub.h b/include/nng/protocol/pubsub0/sub.h
index 81f50a80..7ff63f74 100644
--- a/include/nng/protocol/pubsub0/sub.h
+++ b/include/nng/protocol/pubsub0/sub.h
@@ -19,6 +19,13 @@ NNG_DECL int nng_sub0_open(nng_socket *);
NNG_DECL int nng_sub0_open_raw(nng_socket *);
+NNG_DECL int nng_sub0_socket_subscribe(
+ nng_socket id, const void *buf, size_t sz);
+NNG_DECL int nng_sub0_socket_unsubscribe(
+ nng_socket id, const void *buf, size_t sz);
+NNG_DECL int nng_sub0_ctx_subscribe(nng_ctx id, const void *buf, size_t sz);
+NNG_DECL int nng_sub0_ctx_unsubscribe(nng_ctx id, const void *buf, size_t sz);
+
#ifndef nng_sub_open
#define nng_sub_open nng_sub0_open
#endif