From 34ceda3c2dd4990d15e0341e86861dd291003f63 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 10 Aug 2017 16:33:09 -0700 Subject: 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. --- src/nng_compat.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/nng_compat.c') 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 -- cgit v1.2.3-70-g09d2