From 75aee14e2951cfbd4d8d22375a9f4301890da1ee Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 14 Dec 2016 08:22:23 -0800 Subject: Protocols are 16-bit. --- src/nng.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/nng.h') diff --git a/src/nng.h b/src/nng.h index 0adadb39..556ffba3 100644 --- a/src/nng.h +++ b/src/nng.h @@ -67,7 +67,7 @@ typedef struct nng_stat *nng_stat_t; * error code on failure, or zero on success. The socket starts in cooked * mode. */ -NNG_DECL int nng_socket_create(nng_socket_t *, int proto); +NNG_DECL int nng_socket_create(nng_socket_t *, uint16_t proto); /* * nng_socket_close closes the socket, terminating all activity and @@ -79,6 +79,12 @@ NNG_DECL int nng_socket_create(nng_socket_t *, int proto); */ NNG_DECL int nng_socket_close(nng_socket_t); +/* + * nng_socket_protocol returns the protocol number the socket was created + * with. + */ +uint16_t nng_socket_protocol(nng_socket_t); + /* * nng_socket_setopt sets an option for a specific socket. */ -- cgit v1.2.3-70-g09d2