aboutsummaryrefslogtreecommitdiff
path: root/src/nng.h
diff options
context:
space:
mode:
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);