aboutsummaryrefslogtreecommitdiff
path: root/tests/ws.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-09-07 11:33:05 -0700
committerGarrett D'Amore <garrett@damore.org>2024-10-06 13:59:35 -0700
commit34be2c20a62e94e3a2815dd869609554b3922477 (patch)
tree55eb5ae8aec9d9213f502bffda50abaa11b06bc2 /tests/ws.c
parent74adece2303ab7c2b05459c7ff24b362e9660068 (diff)
downloadnng-34be2c20a62e94e3a2815dd869609554b3922477.tar.gz
nng-34be2c20a62e94e3a2815dd869609554b3922477.tar.bz2
nng-34be2c20a62e94e3a2815dd869609554b3922477.zip
Remove the legacy transport registration functions.
This also allows to remove most of the transport headers. Only zerotier.h sticks around, and only for now. (We expect to eject it into a separate module.)
Diffstat (limited to 'tests/ws.c')
-rw-r--r--tests/ws.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/ws.c b/tests/ws.c
index b4e08718..d2ae7f9b 100644
--- a/tests/ws.c
+++ b/tests/ws.c
@@ -1,5 +1,5 @@
//
-// Copyright 2022 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 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
@@ -14,7 +14,6 @@
#include <nng/nng.h>
#include <nng/protocol/pair1/pair.h>
-#include <nng/transport/ws/websocket.h>
#include "convey.h"
#include "stubs.h"
@@ -27,7 +26,7 @@ check_props_v4(nng_msg *msg)
size_t z;
nng_sockaddr la;
nng_sockaddr ra;
- char * buf;
+ char *buf;
size_t len;
p = nng_msg_get_pipe(msg);
@@ -49,8 +48,7 @@ check_props_v4(nng_msg *msg)
// Request Header
z = 0;
buf = NULL;
- So(nng_pipe_get(p, NNG_OPT_WS_REQUEST_HEADERS, buf, &z) ==
- NNG_EINVAL);
+ So(nng_pipe_get(p, NNG_OPT_WS_REQUEST_HEADERS, buf, &z) == NNG_EINVAL);
So(z > 0);
len = z;
So((buf = nng_alloc(len)) != NULL);
@@ -81,6 +79,5 @@ check_props_v4(nng_msg *msg)
return (0);
}
-TestMain("WebSocket Transport", {
- trantest_test_extended("ws://127.0.0.1:", check_props_v4);
-})
+TestMain("WebSocket Transport",
+ { trantest_test_extended("ws://127.0.0.1:", check_props_v4); })