diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-12-28 21:07:58 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-12-29 14:22:06 -0800 |
| commit | d3bd35ab49ad74528fd9e34cce9016d74dd91943 (patch) | |
| tree | 596459970f49a340f5e292f7bdb4060f4ea2be81 /src/core/protocol.h | |
| parent | 02e90dd4f29037e43f28e3bd1e912d4092011d23 (diff) | |
| download | nng-d3bd35ab49ad74528fd9e34cce9016d74dd91943.tar.gz nng-d3bd35ab49ad74528fd9e34cce9016d74dd91943.tar.bz2 nng-d3bd35ab49ad74528fd9e34cce9016d74dd91943.zip | |
fixes #831 Unify option structures, o_type is unused
Diffstat (limited to 'src/core/protocol.h')
| -rw-r--r-- | src/core/protocol.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/core/protocol.h b/src/core/protocol.h index 12ca7e71..f164ee45 100644 --- a/src/core/protocol.h +++ b/src/core/protocol.h @@ -11,6 +11,8 @@ #ifndef CORE_PROTOCOL_H #define CORE_PROTOCOL_H +#include "core/options.h" + // Protocol implementation details. Protocols must implement the // interfaces in this file. Note that implementing new protocols is // not necessarily intended to be a trivial task. The protocol developer @@ -21,13 +23,6 @@ // As a consequence, most of the concurrency in nng exists in the protocol // implementations. -struct nni_proto_option { - const char *o_name; - int o_type; - int (*o_get)(void *, void *, size_t *, nni_opt_type); - int (*o_set)(void *, const void *, size_t, nni_opt_type); -}; - // nni_proto_pipe contains protocol-specific per-pipe operations. struct nni_proto_pipe_ops { // pipe_init creates the protocol-specific per pipe data structure. @@ -80,7 +75,7 @@ struct nni_proto_ctx_ops { void (*ctx_drain)(void *, nni_aio *); // ctx_options array. - nni_proto_option *ctx_options; + nni_option *ctx_options; }; struct nni_proto_sock_ops { @@ -123,7 +118,7 @@ struct nni_proto_sock_ops { void (*sock_drain)(void *, nni_aio *); // Options. Must not be NULL. Final entry should have NULL name. - nni_proto_option *sock_options; + nni_option *sock_options; }; typedef struct nni_proto_id { |
