diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-08-08 21:19:09 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-08-09 02:38:55 -0700 |
| commit | d64f12553eb6ceb67ed6f6a5b2ceb6c061d375ba (patch) | |
| tree | f6bdac79578176f0d00528d191f862009e761eac /tests/scalability.c | |
| parent | 5f0398de8edd1ed4ddbf6455c66273a6608aad9a (diff) | |
| download | nng-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 'tests/scalability.c')
| -rw-r--r-- | tests/scalability.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/scalability.c b/tests/scalability.c index 1e0ea2a9..e9422f8e 100644 --- a/tests/scalability.c +++ b/tests/scalability.c @@ -43,7 +43,7 @@ openclients(nng_socket *clients, int num) int i; uint64_t t; for (i = 0; i < num; i++) { - if ((rv = nng_open(&clients[i], NNG_PROTO_REQ)) != 0) { + if ((rv = nng_req_open(&clients[i])) != 0) { printf("open #%d: %s\n", i, nng_strerror(rv)); return (rv); } @@ -120,7 +120,7 @@ Main({ clients = calloc(nclients, sizeof(nng_socket)); results = calloc(nclients, sizeof(int)); - if ((nng_open(&rep, NNG_PROTO_REP) != 0) || + if ((nng_rep_open(&rep) != 0) || (nng_setopt(rep, NNG_OPT_RCVBUF, &depth, sizeof(depth)) != 0) || (nng_setopt(rep, NNG_OPT_SNDBUF, &depth, sizeof(depth)) != 0) || (nng_listen(rep, addr, NULL, NNG_FLAG_SYNCH) != 0) || |
