diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-08-10 16:33:09 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-08-10 16:33:09 -0700 |
| commit | 34ceda3c2dd4990d15e0341e86861dd291003f63 (patch) | |
| tree | 278a7bf91e466e00f4c2bea088b73cfeb285ecef /src/nng_compat.c | |
| parent | ac5f0ef7cf501693a9db2fcbd95b7cde419cbb2a (diff) | |
| download | nng-34ceda3c2dd4990d15e0341e86861dd291003f63.tar.gz nng-34ceda3c2dd4990d15e0341e86861dd291003f63.tar.bz2 nng-34ceda3c2dd4990d15e0341e86861dd291003f63.zip | |
Add new PAIR_V1 protocol.
The PAIR_V1 protocol supports both raw and cooked modes, and has loop
prevention included. It also has a polyamorous mode, wherein it allows
multiple connections to be established. In polyamorous mode (set by
an option), the sender requests a paritcular pipe by setting it on the
message.
We default to PAIR_V1 now.
Diffstat (limited to 'src/nng_compat.c')
| -rw-r--r-- | src/nng_compat.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/nng_compat.c b/src/nng_compat.c index e03ff42d..dfcb2134 100644 --- a/src/nng_compat.c +++ b/src/nng_compat.c @@ -92,19 +92,18 @@ static const struct { uint16_t p_id; int (*p_open)(nng_socket *); } nn_protocols[] = { - // clang-format off - { NNG_PROTO_BUS_V0, nng_bus_open }, - { NNG_PROTO_PAIR_V0, nng_pair_open }, - { NNG_PROTO_PUSH_V0, nng_push_open }, - { NNG_PROTO_PULL_V0, nng_pull_open }, - { NNG_PROTO_PUB_V0, nng_pub_open }, - { NNG_PROTO_SUB_V0, nng_sub_open }, - { NNG_PROTO_REQ_V0, nng_req_open }, - { NNG_PROTO_REP_V0, nng_rep_open }, - { NNG_PROTO_SURVEYOR_V0, nng_surveyor_open }, - { NNG_PROTO_RESPONDENT_V0, nng_respondent_open }, + { NNG_PROTO_BUS_V0, nng_bus0_open }, + { NNG_PROTO_PAIR_V0, nng_pair0_open }, + { NNG_PROTO_PAIR_V0, nng_pair1_open }, + { NNG_PROTO_PUSH_V0, nng_push0_open }, + { NNG_PROTO_PULL_V0, nng_pull0_open }, + { NNG_PROTO_PUB_V0, nng_pub0_open }, + { NNG_PROTO_SUB_V0, nng_sub0_open }, + { NNG_PROTO_REQ_V0, nng_req0_open }, + { NNG_PROTO_REP_V0, nng_rep0_open }, + { NNG_PROTO_SURVEYOR_V0, nng_surveyor0_open }, + { NNG_PROTO_RESPONDENT_V0, nng_respondent0_open }, { NNG_PROTO_NONE, NULL }, - // clang-format on }; int |
