From 58c24226e1d688a4eb0d5c3e041d0ee12152c045 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 14 Dec 2016 10:55:01 -0800 Subject: nn_socket_create() implemented. --- src/nng.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/nng.h') 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) -- cgit v1.2.3-70-g09d2