diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-01-01 12:44:02 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-01-01 12:44:02 -0800 |
| commit | 0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13 (patch) | |
| tree | 2dc9ded3dfc724df42a360a9f2de359f406e537f /src/supplemental | |
| parent | f8a2abaf931557030fd6e6683617c6a7877eebf7 (diff) | |
| download | nng-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/supplemental')
| -rw-r--r-- | src/supplemental/websocket/websocket_test.c | 4 | ||||
| -rw-r--r-- | src/supplemental/websocket/wssfile_test.c | 16 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/supplemental/websocket/websocket_test.c b/src/supplemental/websocket/websocket_test.c index f4cfc1b4..91e42601 100644 --- a/src/supplemental/websocket/websocket_test.c +++ b/src/supplemental/websocket/websocket_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,6 +11,8 @@ #include <nng/nng.h> +#include "../sha1/sha1.h" + #include <nuts.h> void diff --git a/src/supplemental/websocket/wssfile_test.c b/src/supplemental/websocket/wssfile_test.c index 7239a1c7..9f059dc6 100644 --- a/src/supplemental/websocket/wssfile_test.c +++ b/src/supplemental/websocket/wssfile_test.c @@ -77,8 +77,8 @@ test_invalid_verify(void) (void) snprintf(addr, sizeof(addr), "wss4://:0/test"); - NUTS_PASS(nng_pair_open(&s1)); - NUTS_PASS(nng_pair_open(&s2)); + NUTS_PASS(nng_pair1_open(&s1)); + NUTS_PASS(nng_pair1_open(&s2)); NUTS_PASS(nng_listener_create(&l, s1, addr)); init_listener_wss_file(l); NUTS_PASS(nng_listener_start(l, 0)); @@ -119,8 +119,8 @@ test_no_verify(void) int port; NUTS_ENABLE_LOG(NNG_LOG_DEBUG); - NUTS_PASS(nng_pair_open(&s1)); - NUTS_PASS(nng_pair_open(&s2)); + NUTS_PASS(nng_pair1_open(&s1)); + NUTS_PASS(nng_pair1_open(&s2)); NUTS_PASS(nng_socket_set_ms(s1, NNG_OPT_SENDTIMEO, 5000)); NUTS_PASS(nng_socket_set_ms(s2, NNG_OPT_RECVTIMEO, 5000)); @@ -170,8 +170,8 @@ test_verify_works(void) bool b; int port; - NUTS_PASS(nng_pair_open(&s1)); - NUTS_PASS(nng_pair_open(&s2)); + NUTS_PASS(nng_pair1_open(&s1)); + NUTS_PASS(nng_pair1_open(&s2)); NUTS_PASS(nng_socket_set_ms(s1, NNG_OPT_SENDTIMEO, 5000)); NUTS_PASS(nng_socket_set_ms(s2, NNG_OPT_RECVTIMEO, 5000)); port = nuts_next_port(); @@ -231,8 +231,8 @@ test_tls_config(void) (void) snprintf(addr, sizeof(addr), "wss4://:0/test"); - NUTS_PASS(nng_pair_open(&s1)); - NUTS_PASS(nng_pair_open(&s2)); + NUTS_PASS(nng_pair1_open(&s1)); + NUTS_PASS(nng_pair1_open(&s2)); NUTS_PASS(nng_listener_create(&l, s1, addr)); NUTS_PASS(nng_listener_get_tls(l, &cfg)); nng_tls_config_hold(cfg); |
