aboutsummaryrefslogtreecommitdiff
path: root/src/sp/transport/udp
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-18 01:17:24 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-18 08:33:05 -0800
commitca6cfe359fa55a5a7f4b6ae73500ffd98e6ee968 (patch)
treed69a9af2e88c9bf5bc0d565bdd2ea975f2723d52 /src/sp/transport/udp
parente54e2b1a98abfdb75232a9b3218714ce34c9a34f (diff)
downloadnng-ca6cfe359fa55a5a7f4b6ae73500ffd98e6ee968.tar.gz
nng-ca6cfe359fa55a5a7f4b6ae73500ffd98e6ee968.tar.bz2
nng-ca6cfe359fa55a5a7f4b6ae73500ffd98e6ee968.zip
URL refactor part 1.
This eliminates most (but not all) of the dynamic allocations associated with URL objects. A number of convenience fields on the URL are removed, but we are able to use common buffer for most of the details.
Diffstat (limited to 'src/sp/transport/udp')
-rw-r--r--src/sp/transport/udp/udp_tran_test.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/sp/transport/udp/udp_tran_test.c b/src/sp/transport/udp/udp_tran_test.c
index 151c2783..781c6ad9 100644
--- a/src/sp/transport/udp/udp_tran_test.c
+++ b/src/sp/transport/udp/udp_tran_test.c
@@ -29,20 +29,9 @@ void
test_udp_wild_card_bind(void)
{
nng_socket s1;
- nng_socket s2;
- char addr[NNG_MAXADDRLEN];
- uint16_t port;
-
- port = nuts_next_port();
NUTS_OPEN(s1);
- NUTS_OPEN(s2);
- (void) snprintf(addr, sizeof(addr), "udp4://*:%u", port);
- NUTS_PASS(nng_listen(s1, addr, NULL, 0));
- nng_msleep(500);
- (void) snprintf(addr, sizeof(addr), "udp://127.0.0.1:%u", port);
- NUTS_PASS(nng_dial(s2, addr, NULL, 0));
- NUTS_CLOSE(s2);
+ NUTS_FAIL(nng_listen(s1, "udp://*:8080", NULL, 0), NNG_EADDRINVAL);
NUTS_CLOSE(s1);
}