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/trantest.h | |
| 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/trantest.h')
| -rw-r--r-- | tests/trantest.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/trantest.h b/tests/trantest.h index fe6e5431..173c6b45 100644 --- a/tests/trantest.h +++ b/tests/trantest.h @@ -29,8 +29,8 @@ void trantest_init(trantest *tt, const char *addr) { (void) snprintf(tt->addr, sizeof(tt->addr), "%s", addr); - So(nng_open(&tt->reqsock, NNG_PROTO_REQ) == 0); - So(nng_open(&tt->repsock, NNG_PROTO_REP) == 0); + So(nng_req_open(&tt->reqsock) == 0); + So(nng_rep_open(&tt->repsock) == 0); tt->tran = nni_tran_find(addr); So(tt->tran != NULL); |
