From b3fc8a44119d7ab90366a1b92a5e1327ebcb8145 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 3 Nov 2024 00:51:15 -0700 Subject: Replace NNG_OPT_SUB_SUBSCRIBE/UNSUBSCRIBE with functions. The main purpose is to eliminate the NNI_TYPE_OPAQUE options, by putting these into their own first class, protocol-specific, functions. --- src/core/socket.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/socket.h') diff --git a/src/core/socket.h b/src/core/socket.h index 8fab08d6..3eb943f4 100644 --- a/src/core/socket.h +++ b/src/core/socket.h @@ -26,7 +26,9 @@ extern bool nni_sock_raw(nni_sock *); extern void *nni_sock_proto_data(nni_sock *); extern void nni_sock_add_stat(nni_sock *, nni_stat_item *); +extern struct nni_proto_sock_ops *nni_sock_proto_ops(nni_sock *); extern struct nni_proto_pipe_ops *nni_sock_proto_pipe_ops(nni_sock *); +extern struct nni_proto_ctx_ops *nni_ctx_proto_ops(nni_ctx *); extern int nni_sock_setopt( nni_sock *, const char *, const void *, size_t, nni_opt_type); @@ -77,6 +79,8 @@ extern int nni_ctx_open(nni_ctx **, nni_sock *); // NNG_ECLOSED unless the final argument is true.) extern int nni_ctx_find(nni_ctx **, uint32_t, bool); +extern void *nni_ctx_proto_data(nni_ctx *); + // nni_ctx_rele is called to release a hold on the context. These holds // are acquired by either nni_ctx_open or nni_ctx_find. If the context // is being closed (nni_ctx_close was called), and this is the last reference, -- cgit v1.2.3-70-g09d2