Skip to content

Updating websocketpp to 0.6-permessage-deflate #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
35a64f5
Added CMake macro to disable websockets functionality on Windows
ras0219 Oct 2, 2015
6e07ff3
Only use PCH when using MSBuild
ras0219 Oct 2, 2015
1dc9934
Add unsolicited pong support with integration tests
glukacsycisco Nov 10, 2015
0292c7c
Refactor the response handling in http_server_httpsys to fix some iss…
gigaplex Nov 12, 2015
94ab404
Fix a couple of race conditions, and use enum instead of bool
gigaplex Nov 13, 2015
a1c52e5
Avoid another unobserved exception handler situation, and add an asse…
gigaplex Nov 13, 2015
11fa3ee
Move the callback that breaks the http_response circular reference so…
gigaplex Nov 13, 2015
0685728
Work around leak of http_request when _complete is never called
gigaplex Nov 13, 2015
90ebeb4
Fix accidental tab
gigaplex Nov 13, 2015
3cb4da7
Fix another accidental tab indent
gigaplex Nov 18, 2015
6c82566
Update CONTRIBUTORS.txt
gigaplex Nov 25, 2015
6a3617a
Added "-Wno-error" and "-Wno-unused-local-typedefs" to the clang supp…
rinoseminara Nov 26, 2015
cabb753
Static lib for uwp
Nov 27, 2015
612f40e
merge with origin
Nov 27, 2015
3c41279
Merge branch 'simonferquel-static_lib_uwp' into development
kavyako Nov 30, 2015
218b965
Merge branch 'pongsupport' of https://github.com/glukacsy/cpprestsdk …
kavyako Dec 1, 2015
32d4a4c
Do not expose set_pong_message on WinRT
kavyako Dec 2, 2015
907b6e6
Merge branch 'glukacsy-pongsupport' into development
kavyako Dec 2, 2015
725c941
Enum classes are preferred to avoid implicit conversions
ras0219-msft Dec 3, 2015
c966484
Minor cleanup
ras0219-msft Dec 3, 2015
20e7d75
Merge branch 'master' of https://github.com/rinopazzo/cpprestsdk into…
kavyako Dec 3, 2015
abfe6a3
--Wno-error is not required, remove it.
kavyako Dec 3, 2015
b099cce
Merge branch 'rinopazzo-master' into development
kavyako Dec 3, 2015
dad24c1
Change the cpprest140_uwp static lib name to libcpprest140..lib
kavyako Dec 7, 2015
8f3a60d
Merge remote-tracking branch 'github/staging' into development
ras0219-msft Dec 7, 2015
63a455b
Merge remote-tracking branch 'origin/master'
ras0219 Dec 8, 2015
61d14bf
Remove use of boost in tests if on windows and excluding websockets
ras0219 Dec 9, 2015
fa9f015
Do not build websocket tests if excluding websockets
ras0219 Dec 9, 2015
4ffcad6
Merge pull request #30 from ras0219/master
kavyako Dec 9, 2015
47e2bf0
Fix #34, Ignore warning C4592
Dec 19, 2015
a7e22d6
Adding include to cpprest/details/web_utilities.h to bring in web_proxy
georgemp Dec 21, 2015
948ce4f
Add TLS extension SNI for boost asio based http_client
Dec 21, 2015
ac76f07
Implementing HTTP and HTTPS client proxy support for non-Windows plat…
deeringc Dec 21, 2015
a20b669
Updating contributors.txt
deeringc Dec 22, 2015
e4de345
(freebsd) compilation fix #1
AnyCPU Dec 22, 2015
9e81bc2
Merge branch 'hs3180-vs2015_1' into development
kavyako Dec 31, 2015
e0adf16
Merge branch 'development' of https://github.com/Microsoft/cpprestsdk…
kavyako Dec 31, 2015
ea40be7
Merge branch 'AnyCPU-master' into development
kavyako Jan 1, 2016
a6cf693
Merge branch 'georgemp-georgemp/oauth2_h_unknown_typename_web_proxy' …
kavyako Jan 1, 2016
fff0b91
Fix indentation in oauth2.h
kavyako Jan 1, 2016
57c2e9e
Rename methods and variable names / incorrporate feedback from #39 re…
Jan 4, 2016
c82795c
Merge branch 'megaposer-master' into development
kavyako Jan 4, 2016
d7c9e7c
Updates from code review. Adding new manual test cases for http_proxy…
deeringc Jan 5, 2016
53293e4
Merge branch 'deeringc-master' into development
kavyako Jan 7, 2016
920d63e
Updating websocketpp to 6.0-permessage-deflate
AntonBikineev Jan 12, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,12 @@ Gery Vessere ([email protected])

Cisco Systems
Gergely Lukacsy (glukacsy)
Chris Deering (deeringc)

Ocedo GmbH
Henning Pfeiffer (megaposer)

thomasschaub

Trimble
Tim Boundy (gigaplex)
42 changes: 25 additions & 17 deletions Release/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ elseif(WIN32)
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
option(BUILD_TESTS "Build tests." ON)
option(BUILD_SAMPLES "Build samples." ON)
option(CPPREST_EXCLUDE_WEBSOCKETS "Exclude websockets functionality." OFF)
option(Boost_USE_STATIC_LIBS ON)

add_definitions(-DUNICODE -D_UNICODE)
Expand All @@ -114,8 +115,12 @@ elseif(WIN32)
endif()
add_definitions(${Casablanca_DEFINITIONS} -D_WINSOCK_DEPRECATED_NO_WARNINGS -DWIN32)

find_package(Boost 1.55 REQUIRED COMPONENTS random system thread filesystem chrono atomic)
find_package(OpenSSL 1.0 REQUIRED)
if (CPPREST_EXCLUDE_WEBSOCKETS)
add_definitions(-DCPPREST_EXCLUDE_WEBSOCKETS=1)
else()
find_package(Boost 1.55 REQUIRED COMPONENTS random system thread filesystem chrono atomic)
find_package(OpenSSL 1.0 REQUIRED)
endif()
else()
message(FATAL_ERROR "-- Unsupported Build Platform.")
endif()
Expand All @@ -134,7 +139,7 @@ elseif((CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR IOS)
message("-- Setting clang options")

set(WARNINGS "-Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls")
set(OSX_SUPPRESSIONS "-Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder")
set(OSX_SUPPRESSIONS "-Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs")
set(WARNINGS "${WARNINGS} ${OSX_SUPPRESSIONS}")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration")
Expand Down Expand Up @@ -165,20 +170,23 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)

# These settings can be used by the test targets
set(Casablanca_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)

find_path(WEBSOCKETPP_CONFIG websocketpp-config.cmake
HINTS /usr/lib/cmake/websocketpp)
find_path(WEBSOCKETPP_CONFIG_VERSION websocketpp-configVersion.cmake
HINTS /usr/lib/cmake/websocketpp)
if(WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION)
include(${WEBSOCKETPP_CONFIG}/websocketpp-config.cmake)
include(${WEBSOCKETPP_CONFIG}/websocketpp-configVersion.cmake)
message("-- Found websocketpp version " ${PACKAGE_VERSION} " on system")
set(Casablanca_INCLUDE_DIRS ${Casablanca_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${WEBSOCKETPP_INCLUDE_DIR})
else(WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION)
set(Casablanca_INCLUDE_DIRS ${Casablanca_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/libs/websocketpp)
message("-- websocketpp not found, using the embedded version")
endif(WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION)
if (NOT CPPREST_EXCLUDE_WEBSOCKETS)
find_path(WEBSOCKETPP_CONFIG websocketpp-config.cmake
HINTS /usr/lib/cmake/websocketpp)
find_path(WEBSOCKETPP_CONFIG_VERSION websocketpp-configVersion.cmake
HINTS /usr/lib/cmake/websocketpp)
if(WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION)
include(${WEBSOCKETPP_CONFIG}/websocketpp-config.cmake)
include(${WEBSOCKETPP_CONFIG}/websocketpp-configVersion.cmake)
message("-- Found websocketpp version " ${PACKAGE_VERSION} " on system")
set(Casablanca_INCLUDE_DIRS ${Casablanca_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${WEBSOCKETPP_INCLUDE_DIR})
else(WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION)
set(Casablanca_INCLUDE_DIRS ${Casablanca_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/libs/websocketpp)
message("-- websocketpp not found, using the embedded version")
endif(WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION)
else()
set(Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
endif()

set(Casablanca_LIBRARY ${LIB}cpprest)
set(Casablanca_LIBRARIES ${Casablanca_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK})
Expand Down
8 changes: 8 additions & 0 deletions Release/include/cpprest/details/http_server_httpsys.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ struct windows_request_context : http::details::_http_server_context
// Dispatch request to the provided http_listener.
void dispatch_request_to_listener(_In_ web::http::experimental::listener::details::http_listener_impl *pListener);

enum class ShouldWaitForBody
{
Wait,
DontWait
};
// Initialise the response task callbacks. If the body has been requested, we should wait for it to avoid race conditions.
void init_response_callbacks(ShouldWaitForBody shouldWait);

// Read in a portion of the request body.
void read_request_body_chunk();

Expand Down
2 changes: 2 additions & 0 deletions Release/include/cpprest/details/web_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ namespace web
namespace http { namespace client { namespace details {
class winhttp_client;
class winrt_client;
class asio_context;
}}}
namespace websockets { namespace client { namespace details {
class winrt_callback_client;
Expand Down Expand Up @@ -124,6 +125,7 @@ class credentials
private:
friend class http::client::details::winhttp_client;
friend class http::client::details::winrt_client;
friend class http::client::details::asio_context;
friend class websockets::client::details::winrt_callback_client;
friend class websockets::client::details::wspp_callback_client;

Expand Down
21 changes: 21 additions & 0 deletions Release/include/cpprest/http_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class http_client_config
, m_set_user_nativehandle_options([](native_handle)->void{})
#if !defined(_WIN32) && !defined(__cplusplus_winrt)
, m_ssl_context_callback([](boost::asio::ssl::context&)->void{})
, m_tlsext_sni_enabled(true)
#endif
#if defined(_WIN32) && !defined(__cplusplus_winrt)
, m_buffer_request(false)
Expand Down Expand Up @@ -347,6 +348,25 @@ class http_client_config
{
return m_ssl_context_callback;
}

/// <summary>
/// Gets the TLS extension server name indication (SNI) status.
/// </summary>
/// <returns>True if TLS server name indication is enabled, false otherwise.</returns>
bool is_tlsext_sni_enabled() const
{
return m_tlsext_sni_enabled;
}

/// <summary>
/// Sets the TLS extension server name indication (SNI) status.
/// </summary>
/// <param name="tlsext_sni_enabled">False to disable the TLS (ClientHello) extension for server name indication, true otherwise.</param>
/// <remarks>Note: This setting is enabled by default as it is required in most virtual hosting scenarios.</remarks>
void set_tlsext_sni_enabled(bool tlsext_sni_enabled)
{
m_tlsext_sni_enabled = tlsext_sni_enabled;
}
#endif

private:
Expand All @@ -372,6 +392,7 @@ class http_client_config

#if !defined(_WIN32) && !defined(__cplusplus_winrt)
std::function<void(boost::asio::ssl::context&)> m_ssl_context_callback;
bool m_tlsext_sni_enabled;
#endif
#if defined(_WIN32) && !defined(__cplusplus_winrt)
bool m_buffer_request;
Expand Down
1 change: 1 addition & 0 deletions Release/include/cpprest/oauth2.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define _CASA_OAUTH2_H

#include "cpprest/http_msg.h"
#include "cpprest/details/web_utilities.h"

namespace web
{
Expand Down
21 changes: 21 additions & 0 deletions Release/include/cpprest/ws_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ class websocket_outgoing_message
{
public:

#if !defined(__cplusplus_winrt)
/// <summary>
/// Sets a the outgoing message to be an unsolicited pong message.
/// This is useful when the client side wants to check whether the server is alive.
/// </summary>
void set_pong_message()
{
this->set_message_pong();
}
#endif

/// <summary>
/// Sets a UTF-8 message as the message body.
/// </summary>
Expand Down Expand Up @@ -152,6 +163,16 @@ class websocket_outgoing_message

const pplx::task_completion_event<void> & body_sent() const { return m_body_sent; }

#if !defined(__cplusplus_winrt)
void set_message_pong()
{
concurrency::streams::container_buffer<std::string> buffer("");
m_msg_type = websocket_message_type::pong;
m_length = static_cast<size_t>(buffer.size());
m_body = buffer;
}
#endif

void set_message(const concurrency::streams::container_buffer<std::string> &buffer)
{
m_msg_type = websocket_message_type::text_message;
Expand Down
1 change: 1 addition & 0 deletions Release/include/pplx/pplxcancellation_token.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#error This file must not be included for Visual Studio 12 or later
#endif

#include <cstdlib>
#include <string>
#include "pplx/pplxinterface.h"

Expand Down
10 changes: 5 additions & 5 deletions Release/libs/websocketpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ project (websocketpp)
cmake_minimum_required (VERSION 2.6)

set (WEBSOCKETPP_MAJOR_VERSION 0)
set (WEBSOCKETPP_MINOR_VERSION 5)
set (WEBSOCKETPP_PATCH_VERSION 1)
set (WEBSOCKETPP_MINOR_VERSION 6)
set (WEBSOCKETPP_PATCH_VERSION 0)
set (WEBSOCKETPP_VERSION ${WEBSOCKETPP_MAJOR_VERSION}.${WEBSOCKETPP_MINOR_VERSION}.${WEBSOCKETPP_PATCH_VERSION})

set(INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files")
Expand Down Expand Up @@ -70,7 +70,7 @@ if (BUILD_TESTS OR BUILD_EXAMPLES)
############ Compiler specific setup

set (WEBSOCKETPP_PLATFORM_LIBS "")
set (WEBSOCKETPP_PLATFORM_TSL_LIBS "")
set (WEBSOCKETPP_PLATFORM_TLS_LIBS "")
set (WEBSOCKETPP_BOOST_LIBS "")

# VC9 and C++11 reasoning
Expand Down Expand Up @@ -111,7 +111,7 @@ if (BUILD_TESTS OR BUILD_EXAMPLES)
# g++
if (CMAKE_COMPILER_IS_GNUCXX)
set (WEBSOCKETPP_PLATFORM_LIBS pthread rt)
set (WEBSOCKETPP_PLATFORM_TSL_LIBS ssl crypto)
set (WEBSOCKETPP_PLATFORM_TLS_LIBS ssl crypto)
set (WEBSOCKETPP_BOOST_LIBS system thread)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
if (NOT APPLE)
Expand All @@ -133,7 +133,7 @@ if (BUILD_TESTS OR BUILD_EXAMPLES)
else()
set (WEBSOCKETPP_PLATFORM_LIBS pthread)
endif()
set (WEBSOCKETPP_PLATFORM_TSL_LIBS ssl crypto)
set (WEBSOCKETPP_PLATFORM_TLS_LIBS ssl crypto)
set (WEBSOCKETPP_BOOST_LIBS system thread)
set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++0x -stdlib=libc++") # todo: is libc++ really needed here?
if (NOT APPLE)
Expand Down
4 changes: 1 addition & 3 deletions Release/libs/websocketpp/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ PROJECT_NAME = "websocketpp"
# This could be handy for archiving the generated documentation or
# if some version control system is used.


PROJECT_NUMBER = "0.5.1"

PROJECT_NUMBER = "0.6.0"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
Expand Down
9 changes: 7 additions & 2 deletions Release/libs/websocketpp/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ elif env['CXX'].startswith('clang++'):

# Wpadded
# Wsign-conversion
#

platform_libs = []
tls_libs = []
Expand Down Expand Up @@ -240,8 +241,12 @@ testee_server = SConscript('#/examples/testee_server/SConscript',variant_dir = b
# testee_client
testee_client = SConscript('#/examples/testee_client/SConscript',variant_dir = builddir + 'testee_client',duplicate = 0)

# utility_client
utility_client = SConscript('#/examples/utility_client/SConscript',variant_dir = builddir + 'utility_client',duplicate = 0)
# scratch_client
scratch_client = SConscript('#/examples/scratch_client/SConscript',variant_dir = builddir + 'scratch_client',duplicate = 0)

# scratch_server
scratch_server = SConscript('#/examples/scratch_server/SConscript',variant_dir = builddir + 'scratch_server',duplicate = 0)


# debug_client
debug_client = SConscript('#/examples/debug_client/SConscript',variant_dir = builddir + 'debug_client',duplicate = 0)
Expand Down
47 changes: 46 additions & 1 deletion Release/libs/websocketpp/changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,55 @@
HEAD

0.6.0
- MINOR BREAKING TRANSPORT POLICY CHANGE: Custom transport policies will now be
required to include a new method `void set_uri(uri_ptr u)`. An implementation
is not required. The stub transport policy includes an example stub method
that can be added to any existing custom transport policy to fulfill this
requirement. This does not affect anyone using the bundled transports or
configs.
- MINOR BREAKING SOCKET POLICY CHANGE: Custom asio transport socket policies
will now be required to include a new method `void set_uri(uri_ptr u)`. Like
with the transport layer, an implementation is not required. This does not
affect anyone using the bundled socket policies.
- MINOR BREAKING DEPENDENCY CHANGE: When using Boost versions greater than or
equal to 1.49 in C++03 mode, `libboost-chrono` is needed now instead of
`libboost-date_time`. Users with C++11 compilers or using Boost versions 1.48
and earlier are not affected. Note: This change affects the bundled unit test
suite.
- Feature: WebSocket++ Asio transport policy can now be used with the standalone
version of Asio (1.8.0+) when a C++11 compiler and standard library are
present. This means that it is possible now to use WebSocket++'s Asio
transport entirely without Boost. Thank you Robert Seiler for proof of concept
code that was used as a guide for this implementation. Fixes #324
- Feature: Adds a vectored/scatter-gather write handler to the iostream
transport.
- Feature: Adds the ability to defer sending an HTTP response until sometime
after the `http_handler` is run. This allows processing of long running http
handlers to defer their response until it is ready without blocking the
network thread. references #425
- Improvement: `echo_server_tls` has been update to demonstrate how to configure
it for Mozilla's recommended intermediate and modern TLS security profiles.
- Improvement: `endpoint::set_timer` now uses a steady clock provided by
`boost::chrono` or `std::chrono` where available instead of the non-monotonic
system clock. Thank you breyed for reporting. fixes #241
- Improvement: Outgoing TLS connections to servers using the SNI extension to
choose a certificate will now work. Thank you moozzyk for reporting.
Fixes #400
- Improvement: Removes an unnecessary mutex lock in `get_con_from_hdl`.
- Cleanup: Asio transport policy has been refactored to remove many Boost
dependencies. On C++03 compilers the `boost::noncopyable` dependency has been
removed and the `boost::date_time` dependency has been replaced with the newer
`boost::chrono` when possible. On C++11 compilers the `boost::aligned_storage`
and `boost::date_time` dependencies are gone, replaced with equivalent C++11
standard library features.
- Bug: Fixes a potential dangling pointer and inconsistent error message
handling in `websocketpp::exception`. #432 Thank you Tom Swirly for the fix.

0.5.1 - 2015-02-27
- Bug: Fixes an issue where some frame data was counted against the max header
size limit, resulting in connections that included a lot of frame data
immediately after the opening handshake to fail.
- Bug: Fix a type in the name of the set method for `max_http_body_size`. #406
- Bug: Fix a typo in the name of the set method for `max_http_body_size`. #406
Thank you jplatte for reporting.

0.5.0 - 2015-01-22
Expand Down
7 changes: 7 additions & 0 deletions Release/libs/websocketpp/examples/echo_server/echo_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ void on_message(server* s, websocketpp::connection_hdl hdl, message_ptr msg) {
<< " and message: " << msg->get_payload()
<< std::endl;

// check for a special command to instruct the server to stop listening so
// it can be cleanly exited.
if (msg->get_payload() == "stop-listening") {
s->stop_listening();
return;
}

try {
s->send(hdl, msg->get_payload(), msg->get_opcode());
} catch (const websocketpp::lib::error_code& e) {
Expand Down
8 changes: 8 additions & 0 deletions Release/libs/websocketpp/examples/echo_server_tls/dh.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-----BEGIN DH PARAMETERS-----
MIIBCAKCAQEAqxMGKZB8YNV8WQnbJWwwwmifc+PfVRtd1FN5v5aQSsf6dpjX3Zlh
N1NmgecsQyg4u2EWe4Umta10QzCgYaxf6QdTCg7iprLzFNw7IvWYbQ6du12NMGDr
hmwA6KQKwbTgPL6mSlSlcK2wTP2FzxDTNffFu10cB/6Fj4kdQjPG0c1Koz/z7OOq
BuDElJLClS8rjp3z1xvrc7gX95dFa2KaKgOAYDkpe8tfHRhHfJeIVS/whH9hzx6r
OBg+E5K9JyvayrUoKgPeptRKCqo8A4YevtMLpRxMup0nMUgAIv6+BGTwPAFpwgl/
8UIVcvjh1v95PwGDM/Q8yvIBJznBYk/e2wIBAg==
-----END DH PARAMETERS-----
Loading