diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/nng/nng.h | 5 | ||||
| -rw-r--r-- | include/nng/protocol/reqrep0/rep.h | 7 | ||||
| -rw-r--r-- | include/nng/protocol/reqrep0/req.h | 7 | ||||
| -rw-r--r-- | include/nng/protocol/survey0/respond.h | 7 | ||||
| -rw-r--r-- | include/nng/protocol/survey0/survey.h | 7 |
5 files changed, 29 insertions, 4 deletions
diff --git a/include/nng/nng.h b/include/nng/nng.h index a0e565d0..f1813cf1 100644 --- a/include/nng/nng.h +++ b/include/nng/nng.h @@ -62,6 +62,11 @@ extern "C" { // with other implementations. #define NNG_MAXADDRLEN (128) +// NNG_PROTOCOL_NUMBER is used by protocol headers to calculate their +// protocol number from a major and minor number. Applications should +// probably not need to use this. +#define NNG_PROTOCOL_NUMBER(maj, min) (((x)*16)+(y)) + // Types common to nng. // Identifiers are wrapped in a structure to improve compiler validation diff --git a/include/nng/protocol/reqrep0/rep.h b/include/nng/protocol/reqrep0/rep.h index 6322b5df..04fe18bf 100644 --- a/include/nng/protocol/reqrep0/rep.h +++ b/include/nng/protocol/reqrep0/rep.h @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a @@ -26,6 +26,11 @@ NNG_DECL int nng_rep0_open_raw(nng_socket *); #define nng_rep_open_raw nng_rep0_open_raw #endif +#define NNG_REP0_SELF 0x31 +#define NNG_REP0_PEER 0x30 +#define NNG_REP0_SELF_NAME "rep" +#define NNG_REP0_PEER_NAME "req" + #ifdef __cplusplus } #endif diff --git a/include/nng/protocol/reqrep0/req.h b/include/nng/protocol/reqrep0/req.h index 392c7932..3ed80216 100644 --- a/include/nng/protocol/reqrep0/req.h +++ b/include/nng/protocol/reqrep0/req.h @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a @@ -25,6 +25,11 @@ NNG_DECL int nng_req0_open_raw(nng_socket *); #define nng_req_open_raw nng_req0_open_raw #endif +#define NNG_REQ0_SELF 0x30 +#define NNG_REQ0_PEER 0x31 +#define NNG_REQ0_SELF_NAME "req" +#define NNG_REQ0_PEER_NAME "rep" + #define NNG_OPT_REQ_RESENDTIME "req:resend-time" #ifdef __cplusplus diff --git a/include/nng/protocol/survey0/respond.h b/include/nng/protocol/survey0/respond.h index b865b2ac..d7dab61d 100644 --- a/include/nng/protocol/survey0/respond.h +++ b/include/nng/protocol/survey0/respond.h @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a @@ -26,6 +26,11 @@ NNG_DECL int nng_respondent0_open_raw(nng_socket *); #define nng_respondent_open_raw nng_respondent0_open_raw #endif +#define NNG_RESPONDENT0_SELF 0x63 +#define NNG_RESPONDENT0_PEER 0x62 +#define NNG_RESPONDENT0_SELF_NAME "respondent" +#define NNG_RESPONDENT0_PEER_NAME "surveyor" + #ifdef __cplusplus } #endif diff --git a/include/nng/protocol/survey0/survey.h b/include/nng/protocol/survey0/survey.h index 37f76fbf..cea4d58b 100644 --- a/include/nng/protocol/survey0/survey.h +++ b/include/nng/protocol/survey0/survey.h @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a @@ -26,6 +26,11 @@ NNG_DECL int nng_surveyor0_open_raw(nng_socket *); #define nng_surveyor_open_raw nng_surveyor0_open_raw #endif +#define NNG_SURVEYOR0_SELF 0x62 +#define NNG_SURVEYOR0_PEER 0x63 +#define NNG_SURVEYOR0_SELF_NAME "surveyor" +#define NNG_SURVEYOR0_PEER_NAME "respondent" + #define NNG_OPT_SURVEYOR_SURVEYTIME "surveyor:survey-time" #ifdef __cplusplus |
