aboutsummaryrefslogtreecommitdiff
path: root/src/platform/ipc_stream_test.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-10-26 10:54:58 -0700
committerGarrett D'Amore <garrett@damore.org>2025-10-27 07:13:40 -0700
commitbe13c2e8845423cec17af429fc4e16a5d9749e47 (patch)
tree82614e403a41aac6581a9a223ef9eba5be557222 /src/platform/ipc_stream_test.c
parent11c53f3d7f747d14fd69ce98c63d629bc821ef68 (diff)
downloadnng-be13c2e8845423cec17af429fc4e16a5d9749e47.tar.gz
nng-be13c2e8845423cec17af429fc4e16a5d9749e47.tar.bz2
nng-be13c2e8845423cec17af429fc4e16a5d9749e47.zip
Replace nng_pipe_get_addr, nng_stream_get_addr, and the NNG_OPT_REMADDR option.
More direct access methods are provided instead. This results in much lower friction when using, and is a step on the path to removing NNG_OPT_LOCADDR as well. We need to figure a solution for NNG_OPT_LOCADDR for dialers; for listeners there is little use in it either, and it will be removed. (Dialers will probably get a new NNG_OPT_BIND_IP option.)
Diffstat (limited to 'src/platform/ipc_stream_test.c')
-rw-r--r--src/platform/ipc_stream_test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/platform/ipc_stream_test.c b/src/platform/ipc_stream_test.c
index fb3bc493..45c78d23 100644
--- a/src/platform/ipc_stream_test.c
+++ b/src/platform/ipc_stream_test.c
@@ -29,9 +29,9 @@ test_ipc_stream(void)
nng_aio *aio1;
nng_aio *aio2;
nng_iov iov;
- nng_sockaddr sa2;
char buf1[5];
char buf2[5];
+ const nng_sockaddr *sap;
NUTS_ADDR(url, "ipc");
NUTS_PASS(nng_aio_alloc(&daio, NULL, NULL));
@@ -85,9 +85,9 @@ test_ipc_stream(void)
NUTS_TRUE(memcmp(buf1, buf2, 5) == 0);
- NUTS_PASS(nng_stream_get_addr(c2, NNG_OPT_LOCADDR, &sa2));
- NUTS_TRUE(sa2.s_ipc.sa_family == NNG_AF_IPC);
- NUTS_MATCH(sa2.s_ipc.sa_path, url + strlen("ipc://"));
+ sap = nng_stream_self_addr(c2);
+ NUTS_TRUE(sap->s_ipc.sa_family == NNG_AF_IPC);
+ NUTS_MATCH(sap->s_ipc.sa_path, url + strlen("ipc://"));
nng_aio_free(aio1);
nng_aio_free(aio2);