Skip to content

Commit fb6d26c

Browse files
committed
Updating websocketpp to version 0.5.1.
1 parent 4990d22 commit fb6d26c

File tree

157 files changed

+6795
-2421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+6795
-2421
lines changed

Release/libs/websocketpp/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,15 @@ install_manifest.txt
3232
*.ncb
3333
*/Debug/*
3434
*/*/Debug/*
35+
bin/Debug
3536
*/Release/*
3637
*/*/Release/*
3738
*/RelWithDebInfo/*
3839
*/*/RelWithDebInfo/*
3940

41+
# explicitly allow this path with /debug/ in it
42+
!websocketpp/transport/debug/*
43+
4044
objs_shared/
4145
objs_static/
4246

@@ -78,3 +82,9 @@ examples/wsperf/wsperf_client
7882
*.out
7983

8084
*.log
85+
*.opensdf
86+
*.sdf
87+
*.vcxproj
88+
*.vcxproj.filters
89+
*.user
90+
install

Release/libs/websocketpp/.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ branches:
1414
- permessage-deflate
1515
- experimental
1616
- 0.3.x-cmake
17+
- develop
1718
notifications:
1819
recipients:
1920

Release/libs/websocketpp/CMakeLists.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ project (websocketpp)
99
cmake_minimum_required (VERSION 2.6)
1010

1111
set (WEBSOCKETPP_MAJOR_VERSION 0)
12-
set (WEBSOCKETPP_MINOR_VERSION 3)
13-
set (WEBSOCKETPP_PATCH_VERSION 0)
12+
set (WEBSOCKETPP_MINOR_VERSION 5)
13+
set (WEBSOCKETPP_PATCH_VERSION 1)
1414
set (WEBSOCKETPP_VERSION ${WEBSOCKETPP_MAJOR_VERSION}.${WEBSOCKETPP_MINOR_VERSION}.${WEBSOCKETPP_PATCH_VERSION})
1515

1616
set(INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files")
@@ -87,7 +87,14 @@ if (BUILD_TESTS OR BUILD_EXAMPLES)
8787

8888
# C++11 defines
8989
if (ENABLE_CPP11)
90-
add_definitions (-D_WEBSOCKETPP_CPP11_STL_)
90+
if (MSVC)
91+
add_definitions (-D_WEBSOCKETPP_CPP11_FUNCTIONAL_)
92+
add_definitions (-D_WEBSOCKETPP_CPP11_SYSTEM_ERROR_)
93+
add_definitions (-D_WEBSOCKETPP_CPP11_RANDOM_DEVICE_)
94+
add_definitions (-D_WEBSOCKETPP_CPP11_MEMORY_)
95+
else()
96+
add_definitions (-D_WEBSOCKETPP_CPP11_STL_)
97+
endif()
9198
endif ()
9299

93100
# Visual studio
@@ -106,7 +113,7 @@ if (BUILD_TESTS OR BUILD_EXAMPLES)
106113
set (WEBSOCKETPP_PLATFORM_LIBS pthread rt)
107114
set (WEBSOCKETPP_PLATFORM_TSL_LIBS ssl crypto)
108115
set (WEBSOCKETPP_BOOST_LIBS system thread)
109-
set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++0x")
116+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
110117
if (NOT APPLE)
111118
add_definitions (-DNDEBUG -Wall -Wcast-align) # todo: should we use CMAKE_C_FLAGS for these?
112119
endif ()

Release/libs/websocketpp/COPYING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Main Library:
22

3-
Copyright (c) 2013, Peter Thorson. All rights reserved.
3+
Copyright (c) 2014, Peter Thorson. All rights reserved.
44

55
Redistribution and use in source and binary forms, with or without
66
modification, are permitted provided that the following conditions are met:

Release/libs/websocketpp/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ PROJECT_NAME = "websocketpp"
3333
# if some version control system is used.
3434

3535

36-
PROJECT_NUMBER = "0.3.0"
36+
PROJECT_NUMBER = "0.5.1"
3737

3838

3939
# Using the PROJECT_BRIEF tag one can provide an optional one line description

Release/libs/websocketpp/SConstruct

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,27 @@ if env['CXX'].startswith('g++'):
101101
#env.Append(CCFLAGS = ['-Wconversion'])
102102
env.Append(CCFLAGS = ['-Wcast-align'])
103103
env.Append(CCFLAGS = ['-Wshadow'])
104+
env.Append(CCFLAGS = ['-Wunused-parameter'])
104105
elif env['CXX'].startswith('clang++'):
105106
#env.Append(CCFLAGS = ['-Wcast-align'])
106107
#env.Append(CCFLAGS = ['-Wglobal-constructors'])
107108
#env.Append(CCFLAGS = ['-Wconversion'])
108109
env.Append(CCFLAGS = ['-Wno-padded'])
109110
env.Append(CCFLAGS = ['-Wshadow'])
111+
env.Append(CCFLAGS = ['-Wunused-parameter'])
112+
113+
env.Append(CCFLAGS = ['-Wsometimes-uninitialized'])
114+
env.Append(CCFLAGS = ['-Wuninitialized'])
115+
116+
#env.Append(CCFLAGS = ['-Weverything'])
117+
#env.Append(CCFLAGS = ['-Wno-documentation'])
118+
#env.Append(CCFLAGS = ['-Wno-weak-vtables'])
119+
#env.Append(CCFLAGS = ['-Wno-global-constructors'])
120+
#env.Append(CCFLAGS = ['-Wno-sign-conversion'])
121+
#env.Append(CCFLAGS = ['-Wno-exit-time-destructors'])
122+
123+
124+
110125

111126
# Wpadded
112127
# Wsign-conversion
@@ -132,7 +147,7 @@ env.Append(CPPPATH = ['#'])
132147

133148
##### Set up C++11 environment
134149
polyfill_libs = [] # boost libraries used as drop in replacements for incomplete
135-
# C++11 STL implementations
150+
# C++11 STL implementations
136151
env_cpp11 = env.Clone ()
137152

138153
if env_cpp11['CXX'].startswith('g++'):
@@ -165,18 +180,18 @@ else:
165180
# values then use it for the boost libraries. Otherwise just add them to the
166181
# regular CPPPATH values.
167182
if env['CXX'].startswith('g++') or env['CXX'].startswith('clang'):
168-
env.Append(CPPFLAGS = '-isystem ' + env['BOOST_INCLUDES'])
183+
env.Append(CPPFLAGS = '-isystem ' + env['BOOST_INCLUDES'])
169184
else:
170-
env.Append(CPPPATH = [env['BOOST_INCLUDES']])
185+
env.Append(CPPPATH = [env['BOOST_INCLUDES']])
171186
env.Append(LIBPATH = [env['BOOST_LIBS']])
172187

173188
# if the build system is known to allow the isystem modifier for library include
174189
# values then use it for the boost libraries. Otherwise just add them to the
175190
# regular CPPPATH values.
176191
if env_cpp11['CXX'].startswith('g++') or env_cpp11['CXX'].startswith('clang'):
177-
env_cpp11.Append(CPPFLAGS = '-isystem ' + env_cpp11['BOOST_INCLUDES'])
192+
env_cpp11.Append(CPPFLAGS = '-isystem ' + env_cpp11['BOOST_INCLUDES'])
178193
else:
179-
env_cpp11.Append(CPPPATH = [env_cpp11['BOOST_INCLUDES']])
194+
env_cpp11.Append(CPPPATH = [env_cpp11['BOOST_INCLUDES']])
180195
env_cpp11.Append(LIBPATH = [env_cpp11['BOOST_LIBS']])
181196

182197
releasedir = 'build/release/'
@@ -237,6 +252,9 @@ debug_server = SConscript('#/examples/debug_server/SConscript',variant_dir = bui
237252
# subprotocol_server
238253
subprotocol_server = SConscript('#/examples/subprotocol_server/SConscript',variant_dir = builddir + 'subprotocol_server',duplicate = 0)
239254

255+
# telemetry_server
256+
telemetry_server = SConscript('#/examples/telemetry_server/SConscript',variant_dir = builddir + 'telemetry_server',duplicate = 0)
257+
240258
if not env['PLATFORM'].startswith('win'):
241259
# iostream_server
242260
iostream_server = SConscript('#/examples/iostream_server/SConscript',variant_dir = builddir + 'iostream_server',duplicate = 0)

Release/libs/websocketpp/changelog.md

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,99 @@
11
HEAD
22

3+
0.5.1 - 2015-02-27
4+
- Bug: Fixes an issue where some frame data was counted against the max header
5+
size limit, resulting in connections that included a lot of frame data
6+
immediately after the opening handshake to fail.
7+
- Bug: Fix a type in the name of the set method for `max_http_body_size`. #406
8+
Thank you jplatte for reporting.
9+
10+
0.5.0 - 2015-01-22
11+
- BREAKING UTILITY CHANGE: Deprecated methods `http::parser::parse_headers`,
12+
`http::response::parse_complete`, and `http::request::parse_complete` have
13+
been removed.
14+
- Security: Disabled SSLv3 in example servers.
15+
- Feature: Adds basic support for accessing HTTP request bodies in the http
16+
handler. #181
17+
- Feature: Adds the ability to register a shutdown handler when using the
18+
iostream transport. This provides a clean interface for triggering the shut
19+
down of external sockets and other cleanup without hooking in to higher level
20+
WebSocket handlers.
21+
- Feature: Adds the ability to register a write handler when using the iostream
22+
transport. This handler can be used to handle transport output in place of
23+
registering an ostream to write to.
24+
- Feature: Adds a new logging policy that outputs to syslog. #386 Thank you Tom
25+
Hughes for submitting the initial version of this policy.
26+
- Improvement: Message payload logging now prints text for text messages rather
27+
than binary.
28+
- Improvement: Overhaul of handshake state machine. Should make it impossible
29+
for exceptions to bubble out of transport methods like `io_service::run`.
30+
- Improvement: Overhaul of handshake error reporting. Fail handler error codes
31+
will be more detailed and precise. Adds new [fail] and [http] logging channels
32+
that log failed websocket connections and successful HTTP connections
33+
respectively. A new aggregate channel package, `alevel::access_core`, allows
34+
enabling connect, disconnect, fail, and http together. Successful HTTP
35+
connections will no longer trigger a fail handler.
36+
- Improvement: Ability to terminate connection during an http handler to cleanly
37+
suppress the default outgoing HTTP response.
38+
- Documentation: Add Sending & Receiving Messages step to chapter one of the
39+
`utility_client` tutorial. Update `utility_client` example to match.
40+
- Cleanup: Removes unused files & STL includes. Adds required STL includes.
41+
Normalizes include order.
42+
- Bug: Fixes a fatal state error when a handshake response is completed
43+
immediately after that handshake times out. #389
44+
- Bug: MinGW fixes; C++11 feature detection, localtime use. #393 Thank you
45+
Schebb for reporting, code, and testing.
46+
- Bug: Fixes an issue where `websocketpp::exception::what()` could return an out
47+
of scope pointer. #397 Thank you fabioang for reporting.
48+
- Bug: Fixes an issue where endpoints were not reset properly after a call to
49+
`endpoint::listen` failed. #390 Thank you wyyqyl for reporting.
50+
51+
0.4.0 - 2014-11-04
52+
- BREAKING API CHANGE: All WebSocket++ methods now throw an exception of type
53+
`websocketpp::exception` which derives from `std::exception`. This normalizes
54+
all exception types under the standard exception hierarchy and allows
55+
WebSocket++ exceptions to be caught in the same statement as others. The error
56+
code that was previously thrown is wrapped in the exception object and can be
57+
accessed via the `websocketpp::exception::code()` method.
58+
- BREAKING API CHANGE: Custom logging policies have some new required
59+
constructors that take generic config settings rather than pointers to
60+
std::ostreams. This allows writing logging policies that do not involve the
61+
use of std::ostream. This does not affect anyone using the built in logging
62+
policies.
63+
- BREAKING UTILITY CHANGE: `websocketpp::lib::net::htonll` and
64+
`websocketpp::lib::net::ntohll` have been prefixed with an underscore to avoid
65+
conflicts with similarly named macros in some operating systems. If you are
66+
using the WebSocket++ provided 64 bit host/network byte order functions you
67+
will need to switch to the prefixed versions.
68+
- BREAKING UTILITY CHANGE: The signature of `base64_encode` has changed from
69+
`websocketpp::base64_encode(unsigned char const *, unsigned int)` to
70+
`websocketpp::base64_encode(unsigned char const *, size_t)`.
71+
- BREAKING UTILITY CHANGE: The signature of `sha1::calc` has changed from
72+
`websocketpp::sha1::calc(void const *, int, unsigned char *)` to
73+
`websocketpp::sha1::calc(void const *, size_t, unsigned char *)`
74+
- Feature: Adds incomplete `minimal_server` and `minimal_client` configs that
75+
can be used to build custom configs without pulling in the dependencies of
76+
`core` or `core_client`. These configs will offer a stable base config to
77+
future-proof custom configs.
78+
- Improvement: Core library no longer has std::iostream as a dependency.
79+
std::iostream is still required for the optional iostream logging policy and
80+
iostream transport.
81+
- Bug: C++11 Chrono support was being incorrectly detected by the `boost_config`
82+
header. Thank you Max Dmitrichenko for reporting and a patch.
83+
- Bug: use of `std::put_time` is now guarded by a unique flag rather than a
84+
chrono library flag. Thank you Max Dmitrichenko for reporting.
85+
- Bug: Fixes non-thread safe use of std::localtime. #347 #383
86+
- Compatibility: Adjust usage of std::min to be more compatible with systems
87+
that define a min(...) macro.
88+
- Compatibility: Removes unused parameters from all library, test, and example
89+
code. This assists with those developing with -Werror and -Wunused-parameter
90+
#376
91+
- Compatibility: Renames ntohll and htonll methods to avoid conflicts with
92+
platform specific macros. #358 #381, #382 Thank you logotype, unphased,
93+
svendjo
94+
- Cleanup: Removes unused functions, fixes variable shadow warnings, normalizes
95+
all whitespace in library, examples, and tests to 4 spaces. #376
96+
397
0.3.0 - 2014-08-10
498
- Feature: Adds `start_perpetual` and `stop_perpetual` methods to asio transport
599
These may be used to replace manually managed `asio::io_service::work` objects
@@ -130,7 +224,7 @@ HEAD
130224
- Change default HTTP response error code when no http_handler is defined from
131225
500/Internal Server Error to 426/Upgrade Required
132226
- Remove timezone from logger timestamp to work around issues with the Windows
133-
implimentation of strftime. Thank you breyed for testing and code. #257
227+
implementation of strftime. Thank you breyed for testing and code. #257
134228
- Switch integer literals to char literals to improve VCPP compatibility.
135229
Thank you breyed for testing and code. #257
136230
- Add MSVCPP warning suppression for the bundled SHA1 library. Thank you breyed

Release/libs/websocketpp/docs/simple_broadcast_server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class broadcast_server {
3636

3737
void run(uint16_t port) {
3838
m_server.listen(port);
39-
m_server.start_accept();
39+
m_server.start_accept();
4040
m_server.run();
4141
}
4242
private:

Release/libs/websocketpp/docs/simple_count_server_thread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class count_server {
4646

4747
void run(uint16_t port) {
4848
m_server.listen(port);
49-
m_server.start_accept();
49+
m_server.start_accept();
5050
m_server.run();
5151
}
5252
private:

Release/libs/websocketpp/examples/broadcast_server/broadcast_server.cpp

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <websocketpp/server.hpp>
44

55
#include <iostream>
6+
#include <set>
67

78
/*#include <boost/thread.hpp>
89
#include <boost/thread/mutex.hpp>
@@ -59,17 +60,13 @@ class broadcast_server {
5960
m_server.listen(port);
6061

6162
// Start the server accept loop
62-
m_server.start_accept();
63+
m_server.start_accept();
6364

64-
// Start the ASIO io_service run loop
65+
// Start the ASIO io_service run loop
6566
try {
6667
m_server.run();
6768
} catch (const std::exception & e) {
6869
std::cout << e.what() << std::endl;
69-
} catch (websocketpp::lib::error_code e) {
70-
std::cout << e.message() << std::endl;
71-
} catch (...) {
72-
std::cout << "other exception" << std::endl;
7370
}
7471
}
7572

@@ -130,7 +127,7 @@ class broadcast_server {
130127
}
131128
}
132129
private:
133-
typedef std::set<connection_hdl,std::owner_less<connection_hdl>> con_list;
130+
typedef std::set<connection_hdl,std::owner_less<connection_hdl> > con_list;
134131

135132
server m_server;
136133
con_list m_connections;
@@ -142,18 +139,18 @@ class broadcast_server {
142139
};
143140

144141
int main() {
145-
try {
146-
broadcast_server server_instance;
142+
try {
143+
broadcast_server server_instance;
147144

148-
// Start a thread to run the processing loop
149-
thread t(bind(&broadcast_server::process_messages,&server_instance));
145+
// Start a thread to run the processing loop
146+
thread t(bind(&broadcast_server::process_messages,&server_instance));
150147

151-
// Run the asio loop with the main thread
152-
server_instance.run(9002);
148+
// Run the asio loop with the main thread
149+
server_instance.run(9002);
153150

154-
t.join();
151+
t.join();
155152

156-
} catch (std::exception & e) {
157-
std::cout << e.what() << std::endl;
158-
}
153+
} catch (websocketpp::exception const & e) {
154+
std::cout << e.what() << std::endl;
155+
}
159156
}

0 commit comments

Comments
 (0)