diff --git a/docs/man/CMakeLists.txt b/docs/man/CMakeLists.txt index 8d48c78f6..2a7c4e961 100644 --- a/docs/man/CMakeLists.txt +++ b/docs/man/CMakeLists.txt @@ -104,8 +104,6 @@ if (NNG_ENABLE_DOC) nng_dialer_start nng_free nng_getopt - nng_inproc_register - nng_ipc_register nng_listen nng_listener_close nng_listener_create @@ -188,15 +186,10 @@ if (NNG_ENABLE_DOC) nng_strfree nng_sub_open nng_surveyor_open - nng_tcp_register - nng_tls_register nng_url_clone nng_url_free nng_url_parse nng_version - nng_ws_register - nng_wss_register - nng_zt_register ) set(NNG_MAN3HTTP diff --git a/docs/man/libnng.3.adoc b/docs/man/libnng.3.adoc index 8d006ba8a..dde2a118f 100644 --- a/docs/man/libnng.3.adoc +++ b/docs/man/libnng.3.adoc @@ -204,20 +204,6 @@ The following functions are used to construct a socket with a specific protocol: |xref:nng_surveyor_open.3.adoc[nng_surveyor_open()]|open a surveyor socket |=== -=== Transports - -The following functions are used to register a transport for use. - -|=== -| xref:nng_inproc_register.3.adoc[nng_inproc_register()]|register inproc transport -| xref:nng_ipc_register.3.adoc[nng_ipc_register()]|register IPC transport -| xref:nng_tcp_register.3.adoc[nng_tcp_register()]|register TCP transport -| xref:nng_tls_register.3.adoc[nng_tls_register()]|register TLS transport -| xref:nng_ws_register.3.adoc[nng_ws_register()]|register WebSocket transport -| xref:nng_wss_register.3.adoc[nng_wss_register()]|register WebSocket Secure transport -| xref:nng_zt_register.3.adoc[nng_zt_register()]|register ZeroTier transport -|=== - === Protocol Contexts The following functions are useful to separate the protocol processing @@ -481,5 +467,4 @@ with TLS support. == SEE ALSO [.text-left] -xref:nng_compat.3compat.adoc[nng_compat(3compat)], xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_inproc.7.adoc b/docs/man/nng_inproc.7.adoc index 833ba3537..6cdb07b13 100644 --- a/docs/man/nng_inproc.7.adoc +++ b/docs/man/nng_inproc.7.adoc @@ -1,6 +1,6 @@ = nng_inproc(7) // -// Copyright 2019 Staysail Systems, Inc. +// Copyright 2024 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This document is supplied under the terms of the MIT License, a @@ -13,15 +13,6 @@ nng_inproc - intra-process transport -== SYNOPSIS - -[source,c] ----- -#include - -int nng_inproc_register(void); ----- - == DESCRIPTION (((transport, _inproc_))) @@ -34,12 +25,8 @@ to slower transports when data must be moved within the same process. This transport tries hard to avoid copying data, and thus is very light-weight. -=== Registration - -This transport is generally built-in to the core, so -no extra steps to use it should be necessary. - === URI Format + (((URI, `inproc://`))) This transport uses URIs using the scheme `inproc://`, followed by an arbitrary string of text, terminated by a `NUL` byte. diff --git a/docs/man/nng_inproc_register.3.adoc b/docs/man/nng_inproc_register.3.adoc deleted file mode 100644 index 8379a4e88..000000000 --- a/docs/man/nng_inproc_register.3.adoc +++ /dev/null @@ -1,47 +0,0 @@ -= nng_inproc_register(3) -// -// Copyright 2021 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_inproc_register - register inproc transport - -== SYNOPSIS - -[source,c] ----- -#include - -int nng_inproc_register(void); ----- - -== DESCRIPTION - -The `nng_inproc_register()` function registers the -((_inproc_ transport))(((transport, _inproc_))) for use. - -NOTE: This function is deprecated, and may be removed from a future release. -It is no longer necessary to explicitly register transports. - -== RETURN VALUES - -This function returns 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_ENOMEM`:: Insufficient memory is available. -`NNG_ENOTSUP`:: The transport is not supported. - -== SEE ALSO - -[.text-left] -xref:nng_inproc.7.adoc[nng_inproc(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_ipc.7.adoc b/docs/man/nng_ipc.7.adoc index c085e4d20..456ea5473 100644 --- a/docs/man/nng_ipc.7.adoc +++ b/docs/man/nng_ipc.7.adoc @@ -1,6 +1,6 @@ = nng_ipc(7) // -// Copyright 2023 Staysail Systems, Inc. +// Copyright 2024 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This document is supplied under the terms of the MIT License, a @@ -13,15 +13,6 @@ nng_ipc - IPC transport -== SYNOPSIS - -[source,c] ----- -#include - -int nng_ipc_register(void); ----- - == DESCRIPTION (((IPC)))(((transport, _ipc_))) @@ -33,11 +24,6 @@ Other platforms may have different implementation strategies. // We need to insert a reference to the nanomsg RFC. -=== Registration - -This transport is generally built-in to the core, so -no extra steps to use it should be necessary. - === URI Formats ==== Traditional Names diff --git a/docs/man/nng_ipc_register.3.adoc b/docs/man/nng_ipc_register.3.adoc deleted file mode 100644 index 64da4b00e..000000000 --- a/docs/man/nng_ipc_register.3.adoc +++ /dev/null @@ -1,47 +0,0 @@ -= nng_ipc_register(3) -// -// Copyright 2021 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_ipc_register - register ipc transport - -== SYNOPSIS - -[source,c] ----- -#include - -int nng_ipc_register(void); ----- - -== DESCRIPTION - -The `nng_ipc_register()` function registers the -((_ipc_ transport))(((transport, _ipc_))) for use. - -NOTE: This function is deprecated, and may be removed from a future release. -It is no longer necessary to explicitly register transports. - -== RETURN VALUES - -This function returns 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_ENOMEM`:: Insufficient memory is available. -`NNG_ENOTSUP`:: The transport is not supported. - -== SEE ALSO - -[.text-left] -xref:nng_ipc.7.adoc[nng_ipc(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_tcp.7.adoc b/docs/man/nng_tcp.7.adoc index c1b9a4395..a5855f773 100644 --- a/docs/man/nng_tcp.7.adoc +++ b/docs/man/nng_tcp.7.adoc @@ -1,6 +1,6 @@ = nng_tcp(7) // -// Copyright 2019 Staysail Systems, Inc. +// Copyright 2024 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This document is supplied under the terms of the MIT License, a @@ -13,15 +13,6 @@ nng_tcp - TCP/IP transport -== SYNOPSIS - -[source,c] ----- -#include - -int nng_tcp_register(void); ----- - == DESCRIPTION (((transport, _tcp_))) @@ -31,11 +22,6 @@ Both IPv4 and IPv6 are supported when the underlying platform also supports it. // We need to insert a reference to the nanomsg RFC. -=== Registration - -This transport is generally built-in to the core of _NNG_, so -no extra steps to use it should be necessary. - === URI Format (((URI, `tcp://`))) diff --git a/docs/man/nng_tcp_register.3.adoc b/docs/man/nng_tcp_register.3.adoc deleted file mode 100644 index 3da671a9b..000000000 --- a/docs/man/nng_tcp_register.3.adoc +++ /dev/null @@ -1,47 +0,0 @@ -= nng_tcp_register(3) -// -// Copyright 2021 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_tcp_register - register tcp transport - -== SYNOPSIS - -[source,c] ----- -#include - -int nng_tcp_register(void); ----- - -== DESCRIPTION - -The `nng_tcp_register()` function registers the -((_tcp_ transport))(((transport, _tcp_))) for use. - -NOTE: This function is deprecated, and may be removed from a future release. -It is no longer necessary to explicitly register transports. - -== RETURN VALUES - -This function returns 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_ENOMEM`:: Insufficient memory is available. -`NNG_ENOTSUP`:: The transport is not supported. - -== SEE ALSO - -[.text-left] -xref:nng_tcp.7.adoc[nng_tcp(7)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_tls.7.adoc b/docs/man/nng_tls.7.adoc index 017af4fc9..0da590ac8 100644 --- a/docs/man/nng_tls.7.adoc +++ b/docs/man/nng_tls.7.adoc @@ -1,6 +1,6 @@ = nng_tls(7) // -// Copyright 2019 Staysail Systems, Inc. +// Copyright 2024 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This document is supplied under the terms of the MIT License, a @@ -13,15 +13,6 @@ nng_tls - TLS transport -== SYNOPSIS - -[source,c] ----- -#include - -int nng_tls_register(void); ----- - == DESCRIPTION (((TLS)))(((Transport Layer Security)))(((transport, _tls_))) @@ -34,12 +25,6 @@ Both IPv4 and IPv6 are supported when the underlying platform also supports it. The protocol details are documented in http://nanomsg.org/rfcs/sp-tls-v1.html[TLS Mapping for Scalability Protocols]. -=== Registration - -Depending upon how the library was built, it may be necessary to -register the transport by calling -xref:nng_tls_register.3.adoc[`nng_tls_register()`]. - === Availability The _tls_ transport depends on the use of an external library. diff --git a/docs/man/nng_tls_register.3.adoc b/docs/man/nng_tls_register.3.adoc deleted file mode 100644 index bfe27e054..000000000 --- a/docs/man/nng_tls_register.3.adoc +++ /dev/null @@ -1,44 +0,0 @@ -= nng_tls_register(3) -// -// Copyright 2018 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_tls_register - register tls transport - -== SYNOPSIS - -[source,c] ----- -#include - -int nng_tls_register(void); ----- - -== DESCRIPTION - -The `nng_tls_register()` function registers the -((_tls_ transport))(((transport, _tls_))) for use. - -== RETURN VALUES - -This function returns 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_ENOMEM`:: Insufficient memory is available. -`NNG_ENOTSUP`:: The transport is not supported. - -== SEE ALSO - -[.text-left] -xref:nng_tls.7.adoc[nng_tls(7)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_ws.7.adoc b/docs/man/nng_ws.7.adoc index 171ec9341..b63041ad4 100644 --- a/docs/man/nng_ws.7.adoc +++ b/docs/man/nng_ws.7.adoc @@ -1,6 +1,6 @@ = nng_ws(7) // -// Copyright 2020 Staysail Systems, Inc. +// Copyright 2024 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This document is supplied under the terms of the MIT License, a @@ -13,16 +13,6 @@ nng_ws - WebSocket transport -== SYNOPSIS - -[source,c] ----- -#include - -int nng_ws_register(void); -int nng_wss_register(void); ----- - == DESCRIPTION (((WebSocket)))(((transport, _ws_ and _wss_))) @@ -34,15 +24,6 @@ Both IPv4 and IPv6 are supported when the underlying platform also supports it. The protocol details are documented in http://nanomsg.org/rfcs/sp-websocket-v1.html[WebSocket Mapping for Scalability Protocols]. -=== Registration - -Depending upon how the library was built, it may be necessary to -register the transport by calling xref:nng_ws_register.3.adoc[`nng_ws_register()`]. - -If ((TLS)) support is enabled in the library, secure WebSockets (over TLS v1.2) -can be used as well, but the secure transport may have to be registered using -the xref:nng_wss_register.3.adoc[`nng_wss_register()`] function. - === URI Format (((URI, `ws://`))) diff --git a/docs/man/nng_ws_register.3.adoc b/docs/man/nng_ws_register.3.adoc deleted file mode 100644 index 7a9cc1f30..000000000 --- a/docs/man/nng_ws_register.3.adoc +++ /dev/null @@ -1,47 +0,0 @@ -= nng_ws_register(3) -// -// Copyright 2021 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_ws_register - register WebSocket transport - -== SYNOPSIS - -[source,c] ----- -#include - -int nng_ws_register(void); ----- - -== DESCRIPTION - -The `nng_ws_register()` function registers the -((_ws_ transport))(((transport, _ws_))) for use. - -NOTE: This function is deprecated, and may be removed from a future release. -It is no longer necessary to explicitly register transports. - -== RETURN VALUES - -This function returns 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_ENOMEM`:: Insufficient memory is available. -`NNG_ENOTSUP`:: The transport is not supported. - -== SEE ALSO - -[.text-left] -xref:nng_ws.7.adoc[nng_ws(7)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_wss_register.3.adoc b/docs/man/nng_wss_register.3.adoc deleted file mode 100644 index 856fe1c0d..000000000 --- a/docs/man/nng_wss_register.3.adoc +++ /dev/null @@ -1,47 +0,0 @@ -= nng_wss_register(3) -// -// Copyright 2021 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_wss_register - register WebSocket secure transport - -== SYNOPSIS - -[source,c] ----- -#include - -int nng_wss_register(void); ----- - -== DESCRIPTION - -The `nng_wss_register()` function registers the -((_wss_ transport))(((transport, _wss_))) for use. - -NOTE: This function is deprecated, and may be removed from a future release. -It is no longer necessary to explicitly register transports. - -== RETURN VALUES - -This function returns 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_ENOMEM`:: Insufficient memory is available. -`NNG_ENOTSUP`:: The transport is not supported. - -== SEE ALSO - -[.text-left] -xref:nng_ws.7.adoc[nng_ws(7)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_zerotier.7.adoc b/docs/man/nng_zerotier.7.adoc index fa8762bf6..36cf7f0ec 100644 --- a/docs/man/nng_zerotier.7.adoc +++ b/docs/man/nng_zerotier.7.adoc @@ -13,15 +13,6 @@ nng_zerotier - ZeroTier transport -== SYNOPSIS - -[source,c] ----- -#include - -int nng_zt_register(void); ----- - == DESCRIPTION (((ZeroTier)))(((transport, _zt_))) @@ -56,15 +47,6 @@ network. NOTE: This document assumes that the reader is familiar with ZeroTier concepts and administration. -=== Registration - -Depending upon how the library was built, it may be necessary to -register the transport by calling -xref:nng_zt_register.3.adoc[`nng_zt_register()`]. -This function -returns zero on success, or an nng error value if the transport -cannot be initialized for any reason. - === URI Format (((URI, `zt://`))) diff --git a/docs/man/nng_zt_register.3.adoc b/docs/man/nng_zt_register.3.adoc deleted file mode 100644 index 9c4a4ac42..000000000 --- a/docs/man/nng_zt_register.3.adoc +++ /dev/null @@ -1,47 +0,0 @@ -= nng_zt_register(3) -// -// Copyright 2021 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_zt_register - register ZeroTier transport - -== SYNOPSIS - -[source,c] ----- -#include - -int nng_zt_register(void); ----- - -== DESCRIPTION - -The `nng_zt_register()` function registers the -((_zt_ transport))(((transport, _zt_))) for use. - -NOTE: This function is deprecated, and may be removed from a future release. -It is no longer necessary to explicitly register transports. - -== RETURN VALUES - -This function returns 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_ENOMEM`:: Insufficient memory is available. -`NNG_ENOTSUP`:: The transport is not supported. - -== SEE ALSO - -[.text-left] -xref:nng_zerotier.7.adoc[nng_zerotier(7)], -xref:nng.7.adoc[nng(7)] diff --git a/include/nng/transport/inproc/inproc.h b/include/nng/transport/inproc/inproc.h deleted file mode 100644 index 0c633620a..000000000 --- a/include/nng/transport/inproc/inproc.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2021 Staysail Systems, Inc. -// Copyright 2017 Capitar IT Group BV -// -// This software is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -#ifndef NNG_TRANSPORT_INPROC_INPROC_H -#define NNG_TRANSPORT_INPROC_INPROC_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// inproc transport. This is used for intra-process communication. -#ifndef NNG_ELIDE_DEPRECATED -NNG_DECL int nng_inproc_register(void); -#endif - -#ifdef __cplusplus -} -#endif - -#endif // NNG_TRANSPORT_INPROC_INPROC_H diff --git a/include/nng/transport/ipc/ipc.h b/include/nng/transport/ipc/ipc.h deleted file mode 100644 index cccef9a1a..000000000 --- a/include/nng/transport/ipc/ipc.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright 2021 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// This software is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -#ifndef NNG_TRANSPORT_IPC_IPC_H -#define NNG_TRANSPORT_IPC_IPC_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// ipc transport. This is used for inter-process communication on -// the same host computer. - -#ifndef NNG_ELIDE_DEPRECATED -NNG_DECL int nng_ipc_register(void); -#endif - -#ifdef __cplusplus -} -#endif - -#endif // NNG_TRANSPORT_IPC_IPC_H diff --git a/include/nng/transport/tcp/tcp.h b/include/nng/transport/tcp/tcp.h deleted file mode 100644 index e236c2710..000000000 --- a/include/nng/transport/tcp/tcp.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2021 Staysail Systems, Inc. -// Copyright 2017 Capitar IT Group BV -// -// This software is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -#ifndef NNG_TRANSPORT_TCP_TCP_H -#define NNG_TRANSPORT_TCP_TCP_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// TCP transport. This is used for communication over TCP/IP. - -#ifndef NNG_ELIDE_DEPRECATED -NNG_DECL int nng_tcp_register(void); -#endif - -#ifdef __cplusplus -} -#endif - -#endif // NNG_TRANSPORT_TCP_TCP_H diff --git a/include/nng/transport/tls/tls.h b/include/nng/transport/tls/tls.h deleted file mode 100644 index 5e99372bd..000000000 --- a/include/nng/transport/tls/tls.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2019 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// This software is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -#ifndef NNG_TRANSPORT_TLS_TLS_H -#define NNG_TRANSPORT_TLS_TLS_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// TLS transport. This is used for communication via TLS v1.2 over TCP/IP. - -#ifndef NNG_ELIDE_DEPRECATED -NNG_DECL int nng_tls_register(void); -#endif - -#ifdef __cplusplus -} -#endif - -#endif // NNG_TRANSPORT_TLS_TLS_H diff --git a/include/nng/transport/ws/websocket.h b/include/nng/transport/ws/websocket.h deleted file mode 100644 index a5f97d468..000000000 --- a/include/nng/transport/ws/websocket.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright 2021 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// This software is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -#ifndef NNG_TRANSPORT_WS_WEBSOCKET_H -#define NNG_TRANSPORT_WS_WEBSOCKET_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// WebSocket transport. This is used for communication via WebSocket. - -// These aliases are for WSS naming consistency. -#define NNG_OPT_WSS_REQUEST_HEADERS NNG_OPT_WS_REQUEST_HEADERS -#define NNG_OPT_WSS_RESPONSE_HEADERS NNG_OPT_WS_RESPONSE_HEADERS - -#ifndef NNG_ELIDE_DEPRECATED -NNG_DECL int nng_ws_register(void); -NNG_DECL int nng_wss_register(void); -#endif - -#ifdef __cplusplus -} -#endif - -#endif // NNG_TRANSPORT_WS_WEBSOCKET_H diff --git a/include/nng/transport/zerotier/zerotier.h b/include/nng/transport/zerotier/zerotier.h index b8745dbdc..178bbfa65 100644 --- a/include/nng/transport/zerotier/zerotier.h +++ b/include/nng/transport/zerotier/zerotier.h @@ -150,10 +150,6 @@ enum nng_zt_status { NNG_ZT_STATUS_UNKNOWN, }; -#ifndef NNG_ELIDE_DEPRECATED -NNG_DECL int nng_zt_register(void); -#endif - #ifdef __cplusplus } #endif diff --git a/src/sp/transport/inproc/CMakeLists.txt b/src/sp/transport/inproc/CMakeLists.txt index 317686bbb..b84ab01e3 100644 --- a/src/sp/transport/inproc/CMakeLists.txt +++ b/src/sp/transport/inproc/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2020 Staysail Systems, Inc. +# Copyright 2024 Staysail Systems, Inc. # Copyright 2018 Capitar IT Group BV # # This software is supplied under the terms of the MIT License, a @@ -12,5 +12,4 @@ nng_directory(inproc) nng_sources_if(NNG_TRANSPORT_INPROC inproc.c) -nng_headers_if(NNG_TRANSPORT_INPROC nng/transport/inproc/inproc.h) -nng_defines_if(NNG_TRANSPORT_INPROC NNG_TRANSPORT_INPROC) \ No newline at end of file +nng_defines_if(NNG_TRANSPORT_INPROC NNG_TRANSPORT_INPROC) diff --git a/src/sp/transport/ipc/CMakeLists.txt b/src/sp/transport/ipc/CMakeLists.txt index c9927f754..7353c4f33 100644 --- a/src/sp/transport/ipc/CMakeLists.txt +++ b/src/sp/transport/ipc/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2020 Staysail Systems, Inc. +# Copyright 2024 Staysail Systems, Inc. # Copyright 2018 Capitar IT Group BV # # This software is supplied under the terms of the MIT License, a @@ -12,6 +12,5 @@ nng_directory(ipc) nng_sources_if(NNG_TRANSPORT_IPC ipc.c) -nng_headers_if(NNG_TRANSPORT_IPC nng/transport/ipc/ipc.h) nng_defines_if(NNG_TRANSPORT_IPC NNG_TRANSPORT_IPC) -nng_test_if(NNG_TRANSPORT_IPC ipc_test) \ No newline at end of file +nng_test_if(NNG_TRANSPORT_IPC ipc_test) diff --git a/src/sp/transport/ipc/ipc.c b/src/sp/transport/ipc/ipc.c index a9aa01139..07bb55484 100644 --- a/src/sp/transport/ipc/ipc.c +++ b/src/sp/transport/ipc/ipc.c @@ -13,8 +13,6 @@ #include "core/nng_impl.h" -#include - // IPC transport. Platform specific IPC operations must be // supplied as well. Normally the IPC is UNIX domain sockets or // Windows named pipes. Other platforms could use other mechanisms, diff --git a/src/sp/transport/tcp/CMakeLists.txt b/src/sp/transport/tcp/CMakeLists.txt index d60223295..fea821c26 100644 --- a/src/sp/transport/tcp/CMakeLists.txt +++ b/src/sp/transport/tcp/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2020 Staysail Systems, Inc. +# Copyright 2024 Staysail Systems, Inc. # Copyright 2018 Capitar IT Group BV # # This software is supplied under the terms of the MIT License, a @@ -12,6 +12,5 @@ nng_directory(tcp) nng_sources_if(NNG_TRANSPORT_TCP tcp.c) -nng_headers_if(NNG_TRANSPORT_TCP nng/transport/tcp/tcp.h) nng_defines_if(NNG_TRANSPORT_TCP NNG_TRANSPORT_TCP) -nng_test(tcp_test) \ No newline at end of file +nng_test(tcp_test) diff --git a/src/sp/transport/tls/CMakeLists.txt b/src/sp/transport/tls/CMakeLists.txt index c2d84c091..f55340a9b 100644 --- a/src/sp/transport/tls/CMakeLists.txt +++ b/src/sp/transport/tls/CMakeLists.txt @@ -12,6 +12,5 @@ nng_directory(tls) nng_sources_if(NNG_TRANSPORT_TLS tls.c) -nng_headers_if(NNG_TRANSPORT_TLS nng/transport/tls/tls.h) nng_defines_if(NNG_TRANSPORT_TLS NNG_TRANSPORT_TLS) nng_test_if(NNG_ENABLE_TLS tls_tran_test) diff --git a/src/sp/transport/tls/tls.c b/src/sp/transport/tls/tls.c index 240b1ed9a..f488771b5 100644 --- a/src/sp/transport/tls/tls.c +++ b/src/sp/transport/tls/tls.c @@ -15,7 +15,6 @@ #include "core/nng_impl.h" #include "nng/supplemental/tls/tls.h" -#include "nng/transport/tls/tls.h" // TLS over TCP transport. Platform specific TCP operations must be // supplied as well, and uses the supplemental TLS v1.2 code. It is not diff --git a/src/sp/transport/ws/CMakeLists.txt b/src/sp/transport/ws/CMakeLists.txt index 6e409b43a..a1bcc960f 100644 --- a/src/sp/transport/ws/CMakeLists.txt +++ b/src/sp/transport/ws/CMakeLists.txt @@ -18,7 +18,4 @@ endif() nng_defines_if(NNG_TRANSPORT_WS NNG_TRANSPORT_WS) nng_defines_if(NNG_TRANSPORT_WSS NNG_TRANSPORT_WSS) nng_sources_if(WS_ON websocket.c) -nng_headers_if(WS_ON nng/transport/ws/websocket.h) nng_test_if(WS_ON ws_test) - - diff --git a/src/sp/transport/ws/websocket.c b/src/sp/transport/ws/websocket.c index 3def08d38..0e377e4b8 100644 --- a/src/sp/transport/ws/websocket.c +++ b/src/sp/transport/ws/websocket.c @@ -17,7 +17,6 @@ #include "supplemental/websocket/websocket.h" #include -#include typedef struct ws_dialer ws_dialer; typedef struct ws_listener ws_listener; diff --git a/src/sp/transport/zerotier/zerotier.c b/src/sp/transport/zerotier/zerotier.c index 967d13e42..295dda5dc 100644 --- a/src/sp/transport/zerotier/zerotier.c +++ b/src/sp/transport/zerotier/zerotier.c @@ -146,23 +146,23 @@ enum zt_errors { struct zt_node { char zn_path[NNG_MAXADDRLEN]; // ought to be sufficient nni_file_lockh *zn_flock; - ZT_Node * zn_znode; + ZT_Node *zn_znode; uint64_t zn_self; nni_list_node zn_link; bool zn_closed; - nni_plat_udp * zn_udp4; - nni_plat_udp * zn_udp6; + nni_plat_udp *zn_udp4; + nni_plat_udp *zn_udp6; nni_list zn_eplist; nni_list zn_plist; - zt_hash * zn_ports; - zt_hash * zn_eps; - zt_hash * zn_lpipes; - zt_hash * zn_rpipes; - nni_aio * zn_rcv4_aio; - uint8_t * zn_rcv4_buf; + zt_hash *zn_ports; + zt_hash *zn_eps; + zt_hash *zn_lpipes; + zt_hash *zn_rpipes; + nni_aio *zn_rcv4_aio; + uint8_t *zn_rcv4_buf; nng_sockaddr zn_rcv4_addr; - nni_aio * zn_rcv6_aio; - uint8_t * zn_rcv6_buf; + nni_aio *zn_rcv6_aio; + uint8_t *zn_rcv6_buf; nng_sockaddr zn_rcv6_addr; nni_thr zn_bgthr; int64_t zn_bgtime; @@ -178,15 +178,15 @@ struct zt_fraglist { int fl_ready; // we have all messages size_t fl_fragsz; unsigned int fl_nfrags; - uint8_t * fl_missing; + uint8_t *fl_missing; size_t fl_missingsz; - nni_msg * fl_msg; + nni_msg *fl_msg; }; struct zt_pipe { nni_list_node zp_link; - zt_node * zp_ztn; - nni_pipe * zp_npipe; + zt_node *zp_ztn; + nni_pipe *zp_npipe; uint64_t zp_nwid; uint64_t zp_laddr; uint64_t zp_raddr; @@ -195,15 +195,15 @@ struct zt_pipe { uint16_t zp_next_msgid; size_t zp_rcvmax; size_t zp_mtu; - nni_aio * zp_user_rxaio; + nni_aio *zp_user_rxaio; nni_time zp_last_recv; zt_fraglist zp_recvq[zt_recvq]; int zp_ping_try; int zp_ping_tries; bool zp_closed; nni_duration zp_ping_time; - nni_aio * zp_ping_aio; - uint8_t * zp_send_buf; + nni_aio *zp_ping_aio; + uint8_t *zp_send_buf; nni_atomic_flag zp_reaped; nni_reap_node zp_reap; }; @@ -218,15 +218,15 @@ struct zt_creq { struct zt_ep { nni_list_node ze_link; char ze_home[NNG_MAXADDRLEN]; // should be enough - zt_node * ze_ztn; + zt_node *ze_ztn; uint64_t ze_nwid; bool ze_running; uint64_t ze_raddr; // remote node address uint64_t ze_laddr; // local node address uint16_t ze_proto; size_t ze_rcvmax; - nni_aio * ze_aio; - nni_aio * ze_creq_aio; + nni_aio *ze_aio; + nni_aio *ze_creq_aio; bool ze_creq_active; int ze_creq_try; nni_list ze_aios; @@ -244,7 +244,7 @@ struct zt_ep { zt_creq ze_creqs[zt_listenq]; int ze_creq_head; int ze_creq_tail; - nni_dialer * ze_ndialer; + nni_dialer *ze_ndialer; nni_listener *ze_nlistener; }; @@ -332,11 +332,11 @@ zt_node_resched(zt_node *ztn, int64_t msec) static void zt_node_rcv4_cb(void *arg) { - zt_node * ztn = arg; - nni_aio * aio = ztn->zn_rcv4_aio; + zt_node *ztn = arg; + nni_aio *aio = ztn->zn_rcv4_aio; struct sockaddr_storage sa; - struct sockaddr_in * sin; - nng_sockaddr_in * nsin; + struct sockaddr_in *sin; + nng_sockaddr_in *nsin; int64_t now; if (nni_aio_result(aio) != 0) { @@ -384,10 +384,10 @@ zt_node_rcv4_cb(void *arg) static void zt_node_rcv6_cb(void *arg) { - zt_node * ztn = arg; - nni_aio * aio = ztn->zn_rcv6_aio; + zt_node *ztn = arg; + nni_aio *aio = ztn->zn_rcv6_aio; struct sockaddr_storage sa; - struct sockaddr_in6 * sin6; + struct sockaddr_in6 *sin6; struct nng_sockaddr_in6 *nsin6; int64_t now; @@ -502,7 +502,7 @@ zt_virtual_config(ZT_Node *node, void *userptr, void *thr, uint64_t nwid, const ZT_VirtualNetworkConfig *config) { zt_node *ztn = userptr; - zt_ep * ep; + zt_ep *ep; NNI_ARG_UNUSED(thr); NNI_ARG_UNUSED(netptr); @@ -822,7 +822,7 @@ zt_pipe_recv_data(zt_pipe *p, const uint8_t *data, size_t len) int i; int slot; uint8_t bit; - uint8_t * body; + uint8_t *body; if (len < zt_size_data) { // Runt frame. Drop it and close pipe with a protocol error. @@ -1033,14 +1033,14 @@ zt_virtual_recv(ZT_Node *node, void *userptr, void *thr, uint64_t nwid, void **netptr, uint64_t srcmac, uint64_t dstmac, unsigned int ethertype, unsigned int vlanid, const void *payload, unsigned int len) { - zt_node * ztn = userptr; + zt_node *ztn = userptr; uint8_t op; const uint8_t *data = payload; uint16_t version; uint32_t rport; uint32_t lport; - zt_ep * ep; - zt_pipe * p; + zt_ep *ep; + zt_pipe *p; uint64_t raddr; uint64_t laddr; @@ -1166,7 +1166,7 @@ static const char *zt_files[] = { static struct { size_t len; - void * data; + void *data; } zt_ephemeral_state[ZT_STATE_OBJECT_NETWORK_CONFIG + 1]; static void @@ -1175,7 +1175,7 @@ zt_state_put(ZT_Node *node, void *userptr, void *thr, int len) { zt_node *ztn = userptr; - char * path; + char *path; const char *template; char fname[32]; @@ -1196,8 +1196,8 @@ zt_state_put(ZT_Node *node, void *userptr, void *thr, // all in the same place, but it does not matter since we don't // really persist them anyway. if (strlen(ztn->zn_path) == 0) { - void * ndata = NULL; - void * odata = zt_ephemeral_state[objtype].data; + void *ndata = NULL; + void *odata = zt_ephemeral_state[objtype].data; size_t olen = zt_ephemeral_state[objtype].len; if ((len >= 0) && ((ndata = nni_alloc(len)) != NULL)) { memcpy(ndata, data, len); @@ -1232,11 +1232,11 @@ zt_state_get(ZT_Node *node, void *userptr, void *thr, unsigned int len) { zt_node *ztn = userptr; - char * path; + char *path; char fname[32]; const char *template; size_t sz; - void * buf; + void *buf; NNI_ARG_UNUSED(node); NNI_ARG_UNUSED(thr); @@ -1292,14 +1292,14 @@ zt_wire_packet_send(ZT_Node *node, void *userptr, void *thr, int64_t socket, const struct sockaddr_storage *remaddr, const void *data, unsigned int len, unsigned int ttl) { - nni_aio * aio; + nni_aio *aio; nni_sockaddr addr; - struct sockaddr_in * sin = (void *) remaddr; + struct sockaddr_in *sin = (void *) remaddr; struct sockaddr_in6 *sin6 = (void *) remaddr; - zt_node * ztn = userptr; - nni_plat_udp * udp; - uint8_t * buf; - zt_send_hdr * hdr; + zt_node *ztn = userptr; + nni_plat_udp *udp; + uint8_t *buf; + zt_send_hdr *hdr; nni_iov iov; NNI_ARG_UNUSED(node); @@ -1418,7 +1418,7 @@ zt_node_destroy(zt_node *ztn) static int zt_node_create(zt_node **ztnp, const char *path) { - zt_node * ztn; + zt_node *ztn; nng_sockaddr sa4; nng_sockaddr sa6; int rv; @@ -1519,9 +1519,9 @@ zt_node_create(zt_node **ztnp, const char *path) static int zt_walk_moons(const char *path, void *arg) { - zt_node * ztn = arg; + zt_node *ztn = arg; const char *bn = nni_file_basename(path); - char * end; + char *end; uint64_t moonid; if (strncmp(bn, "moon.", 5) != 0) { @@ -1537,7 +1537,7 @@ zt_walk_moons(const char *path, void *arg) static int zt_node_find(zt_ep *ep) { - zt_node * ztn; + zt_node *ztn; int rv; ZT_VirtualNetworkConfig *cf; @@ -1958,7 +1958,7 @@ zt_pipe_dorecv(zt_pipe *p) for (int i = 0; i < zt_recvq; i++) { zt_fraglist *fl = &p->zp_recvq[i]; - nni_msg * msg; + nni_msg *msg; if (now > (fl->fl_time + zt_recv_stale)) { // fragment list is stale, clean it. @@ -2197,7 +2197,7 @@ static int zt_ep_init(void **epp, nni_url *url, nni_sock *sock, nni_dialer *ndialer, nni_listener *nlistener) { - zt_ep * ep; + zt_ep *ep; uint64_t node; uint64_t port; int rv; @@ -2286,7 +2286,7 @@ zt_listener_init(void **epp, nni_url *url, nni_listener *l) static void zt_ep_close(void *arg) { - zt_ep * ep = arg; + zt_ep *ep = arg; zt_node *ztn; nni_aio *aio; @@ -2488,7 +2488,7 @@ zt_ep_conn_req_cancel(nni_aio *aio, void *arg, int rv) static void zt_ep_conn_req_cb(void *arg) { - zt_ep * ep = arg; + zt_ep *ep = arg; zt_pipe *p; nni_aio *aio = ep->ze_creq_aio; nni_aio *uaio; @@ -2670,7 +2670,7 @@ static int zt_ep_get_url(void *arg, void *data, size_t *szp, nni_type t) { char ustr[64]; // more than plenty - zt_ep * ep = arg; + zt_ep *ep = arg; uint64_t addr; nni_mtx_lock(&zt_lk); @@ -2688,7 +2688,7 @@ zt_ep_set_orbit(void *arg, const void *data, size_t sz, nni_type t) { uint64_t moonid; uint64_t peerid; - zt_ep * ep = arg; + zt_ep *ep = arg; int rv; enum ZT_ResultCode zrv; @@ -2721,7 +2721,7 @@ static int zt_ep_set_deorbit(void *arg, const void *data, size_t sz, nni_type t) { uint64_t moonid; - zt_ep * ep = arg; + zt_ep *ep = arg; int rv; if ((rv = nni_copyin_u64(&moonid, data, sz, t)) == 0) { @@ -2743,15 +2743,15 @@ static int zt_ep_set_add_local_addr(void *arg, const void *data, size_t sz, nni_type t) { nng_sockaddr sa; - zt_ep * ep = arg; + zt_ep *ep = arg; int rv; if ((rv = nni_copyin_sockaddr(&sa, data, sz, t)) == 0) { enum ZT_ResultCode zrv; - zt_node * ztn; + zt_node *ztn; struct sockaddr_storage ss; - struct sockaddr_in * sin; - struct sockaddr_in6 * sin6; + struct sockaddr_in *sin; + struct sockaddr_in6 *sin6; memset(&ss, 0, sizeof(ss)); switch (sa.s_family) { @@ -2878,7 +2878,7 @@ zt_ep_get_nw_status(void *arg, void *buf, size_t *szp, nni_type t) static int zt_ep_set_ping_time(void *arg, const void *data, size_t sz, nni_type t) { - zt_ep * ep = arg; + zt_ep *ep = arg; nng_duration val; int rv; @@ -2932,7 +2932,7 @@ zt_ep_get_ping_tries(void *arg, void *data, size_t *szp, nni_type t) static int zt_ep_set_conn_time(void *arg, const void *data, size_t sz, nni_type t) { - zt_ep * ep = arg; + zt_ep *ep = arg; nng_duration val; int rv; @@ -2986,7 +2986,7 @@ zt_ep_get_conn_tries(void *arg, void *data, size_t *szp, nni_type t) static int zt_ep_get_locaddr(void *arg, void *data, size_t *szp, nni_type t) { - zt_ep * ep = arg; + zt_ep *ep = arg; nng_sockaddr sa; memset(&sa, 0, sizeof(sa)); @@ -3002,7 +3002,7 @@ zt_ep_get_locaddr(void *arg, void *data, size_t *szp, nni_type t) static int zt_pipe_get_locaddr(void *arg, void *data, size_t *szp, nni_type t) { - zt_pipe * p = arg; + zt_pipe *p = arg; nng_sockaddr sa; memset(&sa, 0, sizeof(sa)); @@ -3016,7 +3016,7 @@ zt_pipe_get_locaddr(void *arg, void *data, size_t *szp, nni_type t) static int zt_pipe_get_remaddr(void *arg, void *data, size_t *szp, nni_type t) { - zt_pipe * p = arg; + zt_pipe *p = arg; nng_sockaddr sa; memset(&sa, 0, sizeof(sa)); @@ -3243,14 +3243,6 @@ static struct nni_sp_tran zt_tran = { .tran_fini = zt_tran_fini, }; -#ifndef NNG_ELIDE_DEPRECATED -int -nng_zt_register(void) -{ - return (nni_init()); -} -#endif - void nni_sp_zt_register(void) { diff --git a/src/supplemental/websocket/websocket.c b/src/supplemental/websocket/websocket.c index 53a262c52..daecbb31c 100644 --- a/src/supplemental/websocket/websocket.c +++ b/src/supplemental/websocket/websocket.c @@ -1,5 +1,5 @@ // -// Copyright 2023 Staysail Systems, Inc. +// Copyright 2024 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // Copyright 2019 Devolutions // @@ -18,8 +18,6 @@ #include "supplemental/http/http_api.h" #include "supplemental/sha1/sha1.h" -#include - #include "websocket.h" // This should be removed or handled differently in the future. @@ -1327,7 +1325,7 @@ ws_http_cb_dialer(nni_ws *ws, nni_aio *aio) // There is a race between the dialer closing and any connections // that were in progress completing. - if (d->closed){ + if (d->closed) { rv = NNG_ECLOSED; goto err; } diff --git a/src/testing/nuts.h b/src/testing/nuts.h index e13a44dad..00a189945 100644 --- a/src/testing/nuts.h +++ b/src/testing/nuts.h @@ -48,7 +48,6 @@ extern void nng_fini(void); #include #include #include -#include #include #ifdef __cplusplus diff --git a/tests/ipc.c b/tests/ipc.c index 4f5de38b4..4011f2aed 100644 --- a/tests/ipc.c +++ b/tests/ipc.c @@ -19,7 +19,6 @@ #include #include -#include #include "convey.h" #include "trantest.h" @@ -49,10 +48,8 @@ check_props(nng_msg *msg) So(nng_pipe_get(p, NNG_OPT_REMADDR, &ra, &z) == NNG_EINVAL); #ifdef _WIN32 - So(nng_pipe_get_uint64(p, NNG_OPT_IPC_PEER_UID, &id) == - NNG_ENOTSUP); - So(nng_pipe_get_uint64(p, NNG_OPT_IPC_PEER_GID, &id) == - NNG_ENOTSUP); + So(nng_pipe_get_uint64(p, NNG_OPT_IPC_PEER_UID, &id) == NNG_ENOTSUP); + So(nng_pipe_get_uint64(p, NNG_OPT_IPC_PEER_GID, &id) == NNG_ENOTSUP); So(nng_pipe_get_uint64(p, NNG_OPT_IPC_PEER_ZONEID, &id) == NNG_ENOTSUP); So(nng_pipe_get_uint64(p, NNG_OPT_IPC_PEER_PID, &id) == 0); @@ -68,8 +65,7 @@ check_props(nng_msg *msg) So(nng_pipe_get_uint64(p, NNG_OPT_IPC_PEER_PID, &id) == 0); So(id == (uint64_t) getpid()); #else - So(nng_pipe_get_uint64(p, NNG_OPT_IPC_PEER_PID, &id) == - NNG_ENOTSUP); + So(nng_pipe_get_uint64(p, NNG_OPT_IPC_PEER_PID, &id) == NNG_ENOTSUP); #endif #ifdef NNG_HAVE_GETPEERUCRED @@ -83,6 +79,5 @@ check_props(nng_msg *msg) return (0); } -TestMain("IPC Transport", { - trantest_test_extended("ipc:///tmp/nng_ipc_test_%u", check_props); -}) +TestMain("IPC Transport", + { trantest_test_extended("ipc:///tmp/nng_ipc_test_%u", check_props); }) diff --git a/tests/multistress.c b/tests/multistress.c index 5511fcc42..e58b94d77 100644 --- a/tests/multistress.c +++ b/tests/multistress.c @@ -24,9 +24,6 @@ #include #include #include -#include -#include -#include #include "convey.h" #include "stubs.h" diff --git a/tests/reqstress.c b/tests/reqstress.c index 6696eacee..de31e9877 100644 --- a/tests/reqstress.c +++ b/tests/reqstress.c @@ -16,9 +16,6 @@ #include #include #include -#include -#include -#include #include "convey.h" #include "stubs.h" diff --git a/tests/tls.c b/tests/tls.c index c3a4a46bf..c218a5a60 100644 --- a/tests/tls.c +++ b/tests/tls.c @@ -1,6 +1,6 @@ // // Copyright 2018 Capitar IT Group BV -// Copyright 2022 Staysail Systems, Inc. +// Copyright 2024 Staysail Systems, Inc. // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -17,7 +17,6 @@ #include #include #include -#include #include "convey.h" #include "stubs.h" @@ -289,14 +288,10 @@ TestMain("TLS Transport", { trantest_test(&tt); - Convey("We can register the TLS transport", - { So(nng_tls_register() == 0); }); - Convey("We cannot connect to wild cards", { nng_socket s; char addr[NNG_MAXADDRLEN]; - So(nng_tls_register() == 0); So(nng_pair_open(&s) == 0); Reset({ nng_close(s); }); trantest_next_address(addr, "tls+tcp://*:"); @@ -310,7 +305,6 @@ TestMain("TLS Transport", { nng_listener l; nng_dialer d; - So(nng_tls_register() == 0); So(nng_pair_open(&s1) == 0); So(nng_pair_open(&s2) == 0); Reset({ @@ -337,7 +331,6 @@ TestMain("TLS Transport", { nng_dialer d; char *addr; - So(nng_tls_register() == 0); So(nng_pair_open(&s1) == 0); So(nng_pair_open(&s2) == 0); Reset({ @@ -359,7 +352,6 @@ TestMain("TLS Transport", { Convey("Malformed TLS addresses do not panic", { nng_socket s1; - So(nng_tls_register() == 0); So(nng_pair_open(&s1) == 0); Reset({ nng_close(s1); }); diff --git a/tests/trantest.h b/tests/trantest.h index 9176c5437..2434171a0 100644 --- a/tests/trantest.h +++ b/tests/trantest.h @@ -54,13 +54,6 @@ extern void trantest_test(trantest *tt); extern void trantest_test_extended(const char *addr, trantest_proptest_t f); extern void trantest_test_all(const char *addr); -#ifndef NNG_TRANSPORT_ZEROTIER -#define nng_zt_register notransport -#endif -#ifndef NNG_TRANSPORT_WSS -#define nng_wss_register notransport -#endif - int notransport(void) { diff --git a/tests/ws.c b/tests/ws.c index b4e087187..d2ae7f9bc 100644 --- a/tests/ws.c +++ b/tests/ws.c @@ -1,5 +1,5 @@ // -// Copyright 2022 Staysail Systems, Inc. +// Copyright 2024 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This software is supplied under the terms of the MIT License, a @@ -14,7 +14,6 @@ #include #include -#include #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); }) diff --git a/tests/wss.c b/tests/wss.c index 6d7bc0034..660ede3ba 100644 --- a/tests/wss.c +++ b/tests/wss.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "convey.h" #include "stubs.h" @@ -136,7 +135,7 @@ check_props(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); @@ -155,8 +154,7 @@ check_props(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);