aboutsummaryrefslogtreecommitdiff
path: root/src/nng.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-14 08:22:23 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-14 08:22:23 -0800
commit75aee14e2951cfbd4d8d22375a9f4301890da1ee (patch)
tree010ddee91e0001453a5b72ed8905ce4e10e91de5 /src/nng.h
parent0f8b89d497d7d8bb0386d816c2a18fe7084153b4 (diff)
downloadnng-75aee14e2951cfbd4d8d22375a9f4301890da1ee.tar.gz
nng-75aee14e2951cfbd4d8d22375a9f4301890da1ee.tar.bz2
nng-75aee14e2951cfbd4d8d22375a9f4301890da1ee.zip
Protocols are 16-bit.
Diffstat (limited to 'src/nng.h')
-rw-r--r--src/nng.h8
1 files changed, 7 insertions, 1 deletions
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
@@ -80,6 +80,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.
*/
NNG_DECL int nng_socket_setopt(nng_socket_t, int, void *, size_t);