aboutsummaryrefslogtreecommitdiff
path: root/src/nng.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-14 10:55:01 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-14 10:55:01 -0800
commit58c24226e1d688a4eb0d5c3e041d0ee12152c045 (patch)
treee03e5c5912d7f53edf8663de7393fe07028fd70f /src/nng.h
parente0543fecaeb01ccdf7512004c54cd72b143b67c8 (diff)
downloadnng-58c24226e1d688a4eb0d5c3e041d0ee12152c045.tar.gz
nng-58c24226e1d688a4eb0d5c3e041d0ee12152c045.tar.bz2
nng-58c24226e1d688a4eb0d5c3e041d0ee12152c045.zip
nn_socket_create() implemented.
Diffstat (limited to 'src/nng.h')
-rw-r--r--src/nng.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nng.h b/src/nng.h
index 556ffba3..1267d0a3 100644
--- a/src/nng.h
+++ b/src/nng.h
@@ -270,9 +270,11 @@ NNG_DECL int nng_pipe_close(nng_pipe_t);
* assigned in the lower 4 bits.
*
* There are gaps in the list, which are obsolete or unsupported protocols.
- * For now we assume that protocol numbers are never more than 16 bits.
+ * Protocol numbers are never more than 16 bits. Also, there will never be
+ * a valid protocol numbered 0 (NNG_PROTO_NONE).
*/
#define NNG_PROTO(major, minor) (((major) * 16) + (minor))
+#define NNG_PROTO_NONE NNG_PROTO(0, 0)
#define NNG_PROTO_PAIR NNG_PROTO(1, 0)
#define NNG_PROTO_PUB NNG_PROTO(2, 0)
#define NNG_PROTO_SUB NNG_PROTO(2, 1)