aboutsummaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-08-14 15:27:38 -0700
committerGarrett D'Amore <garrett@damore.org>2017-08-14 15:27:38 -0700
commit63479c2938cbc80c1aac9367cb95564f6e7540e1 (patch)
tree495584b637f73b593d25f01577eeaa944477f159 /perf
parent343417234aa3fd86e8ae0b56ae500a1ed3411cfc (diff)
downloadnng-63479c2938cbc80c1aac9367cb95564f6e7540e1.tar.gz
nng-63479c2938cbc80c1aac9367cb95564f6e7540e1.tar.bz2
nng-63479c2938cbc80c1aac9367cb95564f6e7540e1.zip
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.
Diffstat (limited to 'perf')
-rw-r--r--perf/perf.c9
1 files changed, 4 insertions, 5 deletions
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));
}