From 65e01d3c7917983d5066335cffb84c93494f1b14 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 27 Feb 2018 14:47:13 -0800 Subject: fixes #240 nngcat is MIA This is intended to provide compatibility with, and has been tested against, legacy nanocat. There are a few differences though. At this time support for the alias names (where argv[0] is set to something like nngreq or somesuch) is missing. By default this library operations without NNG_FLAG_NONBLOCK on dial and listen, so that failures here are immediately diagnosable. (This behavior can be changed with the --async flag.) By default --pair means PAIRv1, but you can specify --pair0 or --pair1 explicitly. (There is also a --compat mode, and in that mode --pair means PAIRv0. The --compat mode also turns on NNG_FLAG_NONBLOCK by default.) The "quoted" mode also quotes tabs. (Legacy nanocat did not.) It is possible to connect to *multiple* peers by using the --dial or --listen (or similar) options multiple times. Shorthands can be used for long options that are not ambiguous. For example, --surv can be used to mean surveyor, but --re is invalid because it can mean req, rep, or respondent. We assume you have a reasonable standard C environment. This won't work in embedded environments without support for FILE *. TLS options are missing but to be added soon. A man page is still to be written. --- src/protocol/pair0/pair.c | 1 + src/protocol/pipeline0/pull.c | 1 + src/protocol/pipeline0/push.c | 1 + 3 files changed, 3 insertions(+) (limited to 'src/protocol') diff --git a/src/protocol/pair0/pair.c b/src/protocol/pair0/pair.c index 10498c0a..d3591df9 100644 --- a/src/protocol/pair0/pair.c +++ b/src/protocol/pair0/pair.c @@ -12,6 +12,7 @@ #include #include "core/nng_impl.h" +#include "protocol/pair0/pair.h" // Pair protocol. The PAIR protocol is a simple 1:1 messaging pattern. // While a peer is connected to the server, all other peer connection diff --git a/src/protocol/pipeline0/pull.c b/src/protocol/pipeline0/pull.c index 76c680c1..ccc1ef40 100644 --- a/src/protocol/pipeline0/pull.c +++ b/src/protocol/pipeline0/pull.c @@ -12,6 +12,7 @@ #include #include "core/nng_impl.h" +#include "protocol/pipeline0/pull.h" // Pull protocol. The PULL protocol is the "read" side of a pipeline. diff --git a/src/protocol/pipeline0/push.c b/src/protocol/pipeline0/push.c index 1e6cf30e..e77bfe99 100644 --- a/src/protocol/pipeline0/push.c +++ b/src/protocol/pipeline0/push.c @@ -12,6 +12,7 @@ #include #include "core/nng_impl.h" +#include "protocol/pipeline0/push.h" // Push protocol. The PUSH protocol is the "write" side of a pipeline. // Push distributes fairly, or tries to, by giving messages in round-robin -- cgit v1.2.3-70-g09d2