aboutsummaryrefslogtreecommitdiff
path: root/src/sp/scalability_test.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-01-01 12:44:02 -0800
committerGarrett D'Amore <garrett@damore.org>2025-01-01 12:44:02 -0800
commit0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13 (patch)
tree2dc9ded3dfc724df42a360a9f2de359f406e537f /src/sp/scalability_test.c
parentf8a2abaf931557030fd6e6683617c6a7877eebf7 (diff)
downloadnng-0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13.tar.gz
nng-0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13.tar.bz2
nng-0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13.zip
protocols: move content from the protocols to nng.h
This should simplify things for developers. Just one header to include in most cases now.
Diffstat (limited to 'src/sp/scalability_test.c')
-rw-r--r--src/sp/scalability_test.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/sp/scalability_test.c b/src/sp/scalability_test.c
index 7579fe7f..02ec01a9 100644
--- a/src/sp/scalability_test.c
+++ b/src/sp/scalability_test.c
@@ -1,5 +1,5 @@
//
-// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2025 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -11,8 +11,6 @@
#include <string.h>
#include <nng/nng.h>
-#include <nng/protocol/reqrep0/rep.h>
-#include <nng/protocol/reqrep0/req.h>
#include <nuts.h>
@@ -49,7 +47,7 @@ openclients(nng_socket *clients, int num)
for (i = 0; i < num; i++) {
t = 100; // 100ms
nng_socket c;
- NUTS_PASS(nng_req_open(&c));
+ NUTS_PASS(nng_req0_open(&c));
NUTS_PASS(nng_socket_set_ms(c, NNG_OPT_RECVTIMEO, t));
NUTS_PASS(nng_socket_set_ms(c, NNG_OPT_SENDTIMEO, t));
NUTS_PASS(nng_dial(c, addr, NULL, 0));
@@ -89,7 +87,7 @@ test_scalability(void)
clients = calloc(nclients, sizeof(nng_socket));
results = calloc(nclients, sizeof(int));
- NUTS_PASS(nng_rep_open(&rep));
+ NUTS_PASS(nng_rep0_open(&rep));
NUTS_PASS(nng_socket_set_int(rep, NNG_OPT_RECVBUF, 256));
NUTS_PASS(nng_socket_set_int(rep, NNG_OPT_SENDBUF, 256));
NUTS_PASS(nng_listen(rep, addr, NULL, 0));