From 63479c2938cbc80c1aac9367cb95564f6e7540e1 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 14 Aug 2017 15:27:38 -0700 Subject: fixes #63 NNG_FLAG_SYNCH should be the default Also enables creating endpoints that are idle (first part of endpoint options API) and shutting down endpoints. --- perf/perf.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'perf') diff --git a/perf/perf.c b/perf/perf.c index 2e631a01..1319fffc 100644 --- a/perf/perf.c +++ b/perf/perf.c @@ -219,7 +219,6 @@ do_inproc_lat(int argc, char **argv) ia.count = parse_int(argv[1], "count"); ia.func = latency_server; - if ((rv = nni_thr_init(&thr, do_inproc, &ia)) != 0) { die("Cannot create thread: %s", nng_strerror(rv)); } @@ -275,7 +274,7 @@ latency_client(const char *addr, int msgsize, int trips) // XXX: set no delay // XXX: other options (TLS in the future?, Linger?) - if ((rv = nng_dial(s, addr, NULL, NNG_FLAG_SYNCH)) != 0) { + if ((rv = nng_dial(s, addr, NULL, 0)) != 0) { die("nng_dial: %s", nng_strerror(rv)); } @@ -321,7 +320,7 @@ latency_server(const char *addr, int msgsize, int trips) // XXX: set no delay // XXX: other options (TLS in the future?, Linger?) - if ((rv = nng_listen(s, addr, NULL, NNG_FLAG_SYNCH)) != 0) { + if ((rv = nng_listen(s, addr, NULL, 0)) != 0) { die("nng_listen: %s", nng_strerror(rv)); } @@ -371,7 +370,7 @@ throughput_server(const char *addr, int msgsize, int count) // XXX: set no delay // XXX: other options (TLS in the future?, Linger?) - if ((rv = nng_listen(s, addr, NULL, NNG_FLAG_SYNCH)) != 0) { + if ((rv = nng_listen(s, addr, NULL, 0)) != 0) { die("nng_listen: %s", nng_strerror(rv)); } @@ -430,7 +429,7 @@ throughput_client(const char *addr, int msgsize, int count) die("nng_setopt(NNG_OPT_SNDBUF): %s", nng_strerror(rv)); } - if ((rv = nng_dial(s, addr, NULL, NNG_FLAG_SYNCH)) != 0) { + if ((rv = nng_dial(s, addr, NULL, 0)) != 0) { die("nng_dial: %s", nng_strerror(rv)); } -- cgit v1.2.3-70-g09d2