diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-14 08:22:23 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-14 08:22:23 -0800 |
| commit | 75aee14e2951cfbd4d8d22375a9f4301890da1ee (patch) | |
| tree | 010ddee91e0001453a5b72ed8905ce4e10e91de5 /src/nng.h | |
| parent | 0f8b89d497d7d8bb0386d816c2a18fe7084153b4 (diff) | |
| download | nng-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.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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); |
