aboutsummaryrefslogtreecommitdiff
path: root/src/tools/perf/perf.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-12-31 13:26:44 -0800
committerGarrett D'Amore <garrett@damore.org>2024-12-31 13:26:44 -0800
commitb0874b1dad787c32093a3ff81311e2d638dc6538 (patch)
treecde1005cef02954893fe2d9786d248930f857200 /src/tools/perf/perf.c
parent2a4a14646f95b21cbc8f9b5bef8d76cd0fe04fec (diff)
downloadnng-b0874b1dad787c32093a3ff81311e2d638dc6538.tar.gz
nng-b0874b1dad787c32093a3ff81311e2d638dc6538.tar.bz2
nng-b0874b1dad787c32093a3ff81311e2d638dc6538.zip
socket: rename nng_close to nng_socket_close
Diffstat (limited to 'src/tools/perf/perf.c')
-rw-r--r--src/tools/perf/perf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/perf/perf.c b/src/tools/perf/perf.c
index c7057c73..1b985c1c 100644
--- a/src/tools/perf/perf.c
+++ b/src/tools/perf/perf.c
@@ -499,7 +499,7 @@ latency_client(const char *addr, size_t msgsize, int trips)
end = nng_clock();
nng_msg_free(msg);
- nng_close(s);
+ nng_socket_close(s);
total = (float) ((end - start)) / 1000;
latency = ((float) ((total * 1000000)) / (float) (trips * 2));
@@ -544,7 +544,7 @@ latency_server(const char *addr, size_t msgsize, int trips)
// Wait a bit for things to drain... linger should do this.
// 100ms ought to be enough.
nng_msleep(100);
- nng_close(s);
+ nng_socket_close(s);
}
// Our throughput story is quite a mess. Mostly I think because of the poor
@@ -598,7 +598,7 @@ throughput_server(const char *addr, size_t msgsize, int count)
// and wait a bit to make sure it goes out the wire.
nng_send(s, "", 0, 0);
nng_msleep(200);
- nng_close(s);
+ nng_socket_close(s);
total = (float) ((end - start)) / 1000;
msgpersec = (float) (count) / total;
mbps = (float) (msgpersec * 8 * msgsize) / (1024 * 1024);
@@ -664,5 +664,5 @@ throughput_client(const char *addr, size_t msgsize, int count)
nng_msg_free(msg);
}
- nng_close(s);
+ nng_socket_close(s);
}