From 3163a56e06a58abb10c753fc77da388234d580c2 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 9 Nov 2024 09:25:22 -0800 Subject: 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. --- include/nng/protocol/pubsub0/sub.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') 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 -- cgit v1.2.3-70-g09d2