From 0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 1 Jan 2025 12:44:02 -0800 Subject: protocols: move content from the protocols to nng.h This should simplify things for developers. Just one header to include in most cases now. --- src/supplemental/websocket/websocket_test.c | 4 +++- src/supplemental/websocket/wssfile_test.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src/supplemental/websocket') 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. +// Copyright 2025 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This software is supplied under the terms of the MIT License, a @@ -11,6 +11,8 @@ #include +#include "../sha1/sha1.h" + #include 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); -- cgit v1.2.3-70-g09d2