diff options
| author | Gregor Burger <gregor.burger@bhs-technologies.com> | 2018-11-20 11:48:03 +0100 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-11-22 12:28:27 -0800 |
| commit | d6bb25e1e0a25cb5aa781ac4f90b513fd5624f50 (patch) | |
| tree | f081a6868a6c3d88b4df64ef20a38fb3e83925d1 /src/transport/ws | |
| parent | 8a9fd805d96201c780610b765f9e6dd9f2eda642 (diff) | |
| download | nng-d6bb25e1e0a25cb5aa781ac4f90b513fd5624f50.tar.gz nng-d6bb25e1e0a25cb5aa781ac4f90b513fd5624f50.tar.bz2 nng-d6bb25e1e0a25cb5aa781ac4f90b513fd5624f50.zip | |
move all public headers to include/nng/ folder
This change makes embedding nng + nggpp (or other projects depending on
nng) in cmake easier. The header files are moved to a separate include
directory. This also makes installation of the headers easier, and
allows clearer identification of private vs public heade files.
Some additional cleanups were performed by @gedamore, but the main
credit for this change belongs with @gregorburger.
Diffstat (limited to 'src/transport/ws')
| -rw-r--r-- | src/transport/ws/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/transport/ws/websocket.c | 4 | ||||
| -rw-r--r-- | src/transport/ws/websocket.h | 32 |
3 files changed, 3 insertions, 37 deletions
diff --git a/src/transport/ws/CMakeLists.txt b/src/transport/ws/CMakeLists.txt index 8104d83c..6e618010 100644 --- a/src/transport/ws/CMakeLists.txt +++ b/src/transport/ws/CMakeLists.txt @@ -33,9 +33,7 @@ if (NNG_TRANSPORT_WS OR NNG_TRANSPORT_WSS) set(NNG_SUPP_BASE64 ON PARENT_SCOPE) set(NNG_SUPP_SHA1 ON PARENT_SCOPE) - set(_SRCS transport/ws/websocket.c transport/ws/websocket.h) - set(_HDRS transport/ws/websocket.h) + set(_SRCS transport/ws/websocket.c ${PROJECT_SOURCE_DIR}/include/nng/transport/ws/websocket.h) set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE) set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE) - set(NNG_HDRS ${NNG_HDRS} ${_HDRS} PARENT_SCOPE) endif() diff --git a/src/transport/ws/websocket.c b/src/transport/ws/websocket.c index 73dd8234..12a1ef17 100644 --- a/src/transport/ws/websocket.c +++ b/src/transport/ws/websocket.c @@ -15,11 +15,11 @@ #include "core/nng_impl.h" #include "supplemental/http/http_api.h" -#include "supplemental/tls/tls.h" +#include "nng/supplemental/tls/tls.h" #include "supplemental/tls/tls_api.h" #include "supplemental/websocket/websocket.h" -#include "websocket.h" +#include "nng/transport/ws/websocket.h" typedef struct ws_dialer ws_dialer; typedef struct ws_listener ws_listener; diff --git a/src/transport/ws/websocket.h b/src/transport/ws/websocket.h deleted file mode 100644 index 8179beab..00000000 --- a/src/transport/ws/websocket.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2018 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 -// 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 - -// WebSocket transport. This is used for communication via WebSocket. - -NNG_DECL int nng_ws_register(void); - -// NNG_OPT_WS_REQUEST_HEADERS is a string containing the -// request headers, formatted as CRLF terminated lines. -#define NNG_OPT_WS_REQUEST_HEADERS "ws:request-headers" - -// NNG_OPT_WS_RESPONSE_HEADERS is a string containing the -// response headers, formatted as CRLF terminated lines. -#define NNG_OPT_WS_RESPONSE_HEADERS "ws:response-headers" - -// 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 - -NNG_DECL int nng_wss_register(void); - -#endif // NNG_TRANSPORT_WS_WEBSOCKET_H |
