diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-03 00:51:15 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-11-03 00:58:37 -0700 |
| commit | b3fc8a44119d7ab90366a1b92a5e1327ebcb8145 (patch) | |
| tree | 994c0199184fdea3d56eeb61b252e10733588947 /src/core/socket.h | |
| parent | 02ec0b55cbee5de4d0fd688ce0ebddf08178dc98 (diff) | |
| download | nng-b3fc8a44119d7ab90366a1b92a5e1327ebcb8145.tar.gz nng-b3fc8a44119d7ab90366a1b92a5e1327ebcb8145.tar.bz2 nng-b3fc8a44119d7ab90366a1b92a5e1327ebcb8145.zip | |
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.
Diffstat (limited to 'src/core/socket.h')
| -rw-r--r-- | src/core/socket.h | 4 |
1 files changed, 4 insertions, 0 deletions
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, |
