aboutsummaryrefslogtreecommitdiff
path: root/src/nng.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-08-08 21:19:09 -0700
committerGarrett D'Amore <garrett@damore.org>2017-08-09 02:38:55 -0700
commitd64f12553eb6ceb67ed6f6a5b2ceb6c061d375ba (patch)
treef6bdac79578176f0d00528d191f862009e761eac /src/nng.c
parent5f0398de8edd1ed4ddbf6455c66273a6608aad9a (diff)
downloadnng-d64f12553eb6ceb67ed6f6a5b2ceb6c061d375ba.tar.gz
nng-d64f12553eb6ceb67ed6f6a5b2ceb6c061d375ba.tar.bz2
nng-d64f12553eb6ceb67ed6f6a5b2ceb6c061d375ba.zip
fixes #44 open protocol by "name" (symbol) instead number
fixes #38 Make protocols "pluggable", or at least optional This is a breaking change, as we've done away with the central registered list of protocols, and instead demand the user call nng_xxx_open() where xxx is a protocol name. (We did keep a table around in the compat framework though.) There is a nice way for protocols to plug in via an nni_proto_open(), where they can use a generic constructor that they use to build a protocol specific constructor (passing their ops vector in.)
Diffstat (limited to 'src/nng.c')
-rw-r--r--src/nng.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/nng.c b/src/nng.c
index d5cc4f2b..815fb2b8 100644
--- a/src/nng.c
+++ b/src/nng.c
@@ -21,22 +21,6 @@
#include <string.h>
-int
-nng_open(nng_socket *sidp, uint16_t proto)
-{
- int rv;
- nni_sock *sock;
-
- if ((rv = nni_sock_open(&sock, proto)) != 0) {
- return (rv);
- }
- *sidp = nni_sock_id(sock);
-
- // Keep the socket "held" until it is explicitly closed.
-
- return (0);
-}
-
void
nng_fini(void)
{