diff options
| author | Garrett D'Amore <garrett@damore.org> | 2021-08-01 08:25:58 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2021-08-01 08:25:58 -0700 |
| commit | 524a3f6ec6e1e921c16ff18997ae494cad09f860 (patch) | |
| tree | 17eb6bf491a1c75fa510392eb7df76769e36d163 /include | |
| parent | 5e5881391bfa6e261ab0f6349a5f12a526e2f293 (diff) | |
| download | nng-524a3f6ec6e1e921c16ff18997ae494cad09f860.tar.gz nng-524a3f6ec6e1e921c16ff18997ae494cad09f860.tar.bz2 nng-524a3f6ec6e1e921c16ff18997ae494cad09f860.zip | |
Fix premature transport registration. Mark it deprecated.
Originally the idea was to better support having the transports
be separate loadable modules. This isn't needed for the builtin
transports, so we make the explicit initialization of them
deprecated, and document it as such.
Diffstat (limited to 'include')
| -rw-r--r-- | include/nng/transport/inproc/inproc.h | 5 | ||||
| -rw-r--r-- | include/nng/transport/ipc/ipc.h | 4 | ||||
| -rw-r--r-- | include/nng/transport/tcp/tcp.h | 4 | ||||
| -rw-r--r-- | include/nng/transport/tls/tls.h | 2 | ||||
| -rw-r--r-- | include/nng/transport/ws/websocket.h | 7 | ||||
| -rw-r--r-- | include/nng/transport/zerotier/zerotier.h | 2 |
6 files changed, 17 insertions, 7 deletions
diff --git a/include/nng/transport/inproc/inproc.h b/include/nng/transport/inproc/inproc.h index 80a83883..0c633620 100644 --- a/include/nng/transport/inproc/inproc.h +++ b/include/nng/transport/inproc/inproc.h @@ -1,5 +1,5 @@ // -// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2017 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a @@ -18,8 +18,9 @@ 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 } diff --git a/include/nng/transport/ipc/ipc.h b/include/nng/transport/ipc/ipc.h index 18d2046d..cccef9a1 100644 --- a/include/nng/transport/ipc/ipc.h +++ b/include/nng/transport/ipc/ipc.h @@ -1,5 +1,5 @@ // -// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2021 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 @@ -20,7 +20,9 @@ extern "C" { // 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 } diff --git a/include/nng/transport/tcp/tcp.h b/include/nng/transport/tcp/tcp.h index 2ca40b70..e236c271 100644 --- a/include/nng/transport/tcp/tcp.h +++ b/include/nng/transport/tcp/tcp.h @@ -1,5 +1,5 @@ // -// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2017 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a @@ -19,7 +19,9 @@ extern "C" { // TCP transport. This is used for communication over TCP/IP. +#ifndef NNG_ELIDE_DEPRECATED NNG_DECL int nng_tcp_register(void); +#endif #ifdef __cplusplus } diff --git a/include/nng/transport/tls/tls.h b/include/nng/transport/tls/tls.h index 700d5fff..5e99372b 100644 --- a/include/nng/transport/tls/tls.h +++ b/include/nng/transport/tls/tls.h @@ -19,7 +19,9 @@ extern "C" { // 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 } diff --git a/include/nng/transport/ws/websocket.h b/include/nng/transport/ws/websocket.h index 69577107..a5f97d46 100644 --- a/include/nng/transport/ws/websocket.h +++ b/include/nng/transport/ws/websocket.h @@ -1,5 +1,5 @@ // -// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2021 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 @@ -19,13 +19,14 @@ extern "C" { // WebSocket transport. This is used for communication via WebSocket. -NNG_DECL int nng_ws_register(void); - // 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 } diff --git a/include/nng/transport/zerotier/zerotier.h b/include/nng/transport/zerotier/zerotier.h index ea73fea7..b8745dbd 100644 --- a/include/nng/transport/zerotier/zerotier.h +++ b/include/nng/transport/zerotier/zerotier.h @@ -150,7 +150,9 @@ enum nng_zt_status { NNG_ZT_STATUS_UNKNOWN, }; +#ifndef NNG_ELIDE_DEPRECATED NNG_DECL int nng_zt_register(void); +#endif #ifdef __cplusplus } |
