aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-01-03 12:46:33 -0800
committerGarrett D'Amore <garrett@damore.org>2025-01-04 09:48:44 -0800
commit57e736b5be2052484eec44889586bd89a2724c71 (patch)
treef579d2863d7d31e202f083ab6d5f5fe85651e64c /src/core
parentcefc6e1995f7f8e53e16db745eac7a86c2ebffd3 (diff)
downloadnng-57e736b5be2052484eec44889586bd89a2724c71.tar.gz
nng-57e736b5be2052484eec44889586bd89a2724c71.tar.bz2
nng-57e736b5be2052484eec44889586bd89a2724c71.zip
api: rename nng_send_aio and nng_recv_aio to nng_socket_send and nng_socket_recv
This aligns more closely with the nng_ctx functions.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/aio_test.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/aio_test.c b/src/core/aio_test.c
index d8d70e12..01765dce 100644
--- a/src/core/aio_test.c
+++ b/src/core/aio_test.c
@@ -1,5 +1,5 @@
//
-// Copyright 2023 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
@@ -10,7 +10,7 @@
#include <string.h>
-#include <nuts.h>
+#include "nuts.h"
static void
cb_done(void *p)
@@ -148,7 +148,7 @@ test_consumer_cancel(void)
NUTS_TRUE(nng_aio_alloc(&a, cb_done, &done) == 0);
nng_aio_set_timeout(a, NNG_DURATION_INFINITE);
- nng_recv_aio(s1, a);
+ nng_socket_recv(s1, a);
nng_aio_cancel(a);
nng_aio_wait(a);
NUTS_TRUE(done == 1);
@@ -185,10 +185,10 @@ test_traffic(void)
NUTS_PASS(nng_msg_alloc(&m, 0));
NUTS_PASS(nng_msg_append(m, "hello", strlen("hello")));
- nng_recv_aio(s2, rx_aio);
+ nng_socket_recv(s2, rx_aio);
nng_aio_set_msg(tx_aio, m);
- nng_send_aio(s1, tx_aio);
+ nng_socket_send(s1, tx_aio);
nng_aio_wait(tx_aio);
nng_aio_wait(rx_aio);
@@ -221,7 +221,7 @@ test_explicit_timeout(void)
NUTS_PASS(nng_pair1_open(&s));
NUTS_PASS(nng_aio_alloc(&a, cb_done, &done));
nng_aio_set_timeout(a, 40);
- nng_recv_aio(s, a);
+ nng_socket_recv(s, a);
nng_aio_wait(a);
NUTS_TRUE(done == 1);
NUTS_FAIL(nng_aio_result(a), NNG_ETIMEDOUT);
@@ -242,7 +242,7 @@ test_explicit_expiration(void)
now = nng_clock();
now += 40;
nng_aio_set_expire(a, now);
- nng_recv_aio(s, a);
+ nng_socket_recv(s, a);
nng_aio_wait(a);
NUTS_TRUE(done == 1);
NUTS_FAIL(nng_aio_result(a), NNG_ETIMEDOUT);
@@ -260,7 +260,7 @@ test_inherited_timeout(void)
NUTS_PASS(nng_pair1_open(&s));
NUTS_PASS(nng_aio_alloc(&a, cb_done, &done));
NUTS_PASS(nng_socket_set_ms(s, NNG_OPT_RECVTIMEO, 40));
- nng_recv_aio(s, a);
+ nng_socket_recv(s, a);
nng_aio_wait(a);
NUTS_TRUE(done == 1);
NUTS_FAIL(nng_aio_result(a), NNG_ETIMEDOUT);
@@ -278,7 +278,7 @@ test_zero_timeout(void)
NUTS_PASS(nng_pair1_open(&s));
NUTS_PASS(nng_aio_alloc(&a, cb_done, &done));
nng_aio_set_timeout(a, NNG_DURATION_ZERO);
- nng_recv_aio(s, a);
+ nng_socket_recv(s, a);
nng_aio_wait(a);
NUTS_TRUE(done == 1);
NUTS_FAIL(nng_aio_result(a), NNG_ETIMEDOUT);