Commit Graph

331 Commits

Author SHA1 Message Date
Peter Thorson 6a94162264 Fix error handling in debug_client fixes #473 2015-10-30 08:45:32 -04:00
vladon cd4af122c0 avoid unnecessary empty strings ("") in favor of clear() and empty() (performance) 2015-09-29 21:36:41 +03:00
Peter Thorson 72e55a76b5 remove alias for better compatibility with older compilers 2015-09-17 10:09:28 -04:00
Peter Thorson 3e8dbf767d Add example demonstrating external io_service 2015-09-17 08:11:48 -04:00
Peter Thorson 3c77ce3cc7 Fix race condition resulting in corruption of responses sent from non-blocking HTTP handers
The HTTP request processing code was expecting that the http response
state would be `deferred` after a call to an HTTP handler that deferred
the response. If, in addition to deferring, you also sent the response
the HTTP state advanced past `deferred` to `response_written`. This
doesn't easily show up in unit tests because the bug requires that the
async write still be in flight and the connection still be open when
the HTTP handler returns.

An asynchronous network transport (like Asio) combined with a
sufficiently large message that Asio yields control back to WebSocket++
before the response is fully written will trigger a second write on the
same connection while the first is in flight. This is not allowed per
the Asio spec and results in undefined behavior.

The HTTP request processing code now checks if the http state is init,
i.e. not deferred and no response has been started rather than just if
it was deferred.
2015-09-09 10:14:37 -04:00
Peter Thorson 22918a3992 Merge branch 'permessage-deflate' into develop
Conflicts:
	Doxyfile
	examples/utility_client/CMakeLists.txt
	websocketpp/version.hpp
2015-07-29 09:12:21 -04:00
Peter Thorson ef380f7fff Add CMake build support for examples and tests, zlib dependencies 2015-07-29 08:57:56 -04:00
Peter Thorson c54f2abaab utility client build scripts 2015-07-23 07:53:51 -04:00
Peter Thorson 3580530902 Miscellaneous changes
- Updates code style
- Adds some tags for future exception free work
- Fix utility client build scripts
2015-07-23 07:53:31 -04:00
Thijs Wenker bc7ad6550e fixed typo 2015-07-16 12:18:32 +02:00
Thijs Wenker d3fe51fa39 Added missing CMake files, organized the CMake structure between test and example directories using the global variable USE_FOLDERS 2015-07-16 12:17:59 +02:00
Thijs Wenker 7514c82c92 CMake: properly include examples and tests with macro (added unit_test_framework dependency for unit tests) 2015-07-16 11:38:38 +02:00
Peter Thorson 0d7052d2ae Merge branch 'master' into permessage-deflate
Update permessage-deflate to track latest release version.
2015-06-03 09:21:06 -04:00
Peter Thorson b817c4499e Updates echo_server_tls reference TLS settings 2015-04-25 12:28:28 -04:00
Peter Thorson 769fe89533 Major refactor to support standalone Asio and remove Boost dependencies
It is now possible to use WebSocket++’s asio transport using only
standalone asio by defining ASIO_STANDALONE before including any
WebSocket++ headers.
2015-04-25 07:17:28 -04:00
Peter Thorson 2c843b9343 echo_server now checks for a special command to stop listening for new connections 2015-04-14 08:14:47 -04:00
Peter Thorson 174698f1df update testee_server and testee_client Autobahn test examples to support permessage deflate 2015-02-27 07:48:45 -05:00
Peter Thorson f9b08ccea1 Merge branch 'master' into permessage-deflate
Conflicts:
	websocketpp/extensions/permessage_deflate/enabled.hpp
2015-01-22 10:21:11 -05:00
Peter Thorson d55f28fe4b fix a bunch of minor warnings 2015-01-20 07:53:53 -05:00
Peter Thorson 4d1693c96c Merge branch 'master' into permessage-deflate
Conflicts:
	examples/print_server/print_server.cpp
	websocketpp/extensions/permessage_deflate/enabled.hpp
2015-01-20 06:51:06 -05:00
Peter Thorson ef393f8aef Overhaul error handling for failed WebSocket and HTTP connections 2014-12-12 18:31:21 -05:00
Peter Thorson 3c6c757d93 debug client/server updates 2014-12-10 21:33:59 -05:00
Peter Thorson 27cea4e58f don't set non-existent handler! 2014-12-08 19:35:47 -05:00
Peter Thorson e7b2e69ecb remove unneeded code 2014-12-08 19:26:24 -05:00
Peter Thorson 77f1bf593d Adds telemetry_server example 2014-12-08 18:56:44 -05:00
Peter Thorson 0a47a9a78c adjust example exception behavior to match latest spec 2014-12-08 18:56:28 -05:00
Peter Thorson cbe887524e Documentation and code style for syslog logger references #386 2014-12-05 10:10:44 -05:00
Peter Thorson 0ad2da2083 updates to debug server to help test HTTP request body issues 2014-12-04 08:16:32 -05:00
Peter Thorson f6c6552622 Access to HTTP request bodies references #181
Use connection::get_request_body() to access. Use
endpoint::set_max_http_body_size(size_t value) to control maximum
upload size. Initial support is for single chunk bodies that define a
content-length . Transfer-Encoding: chunked is not currently supported
2014-11-18 22:05:46 -05:00
Peter Thorson d1f3eb9516 code style, correct STL includes 2014-11-18 07:52:36 -05:00
Peter Thorson 7dfe0d5815 fix some utility client warnings 2014-11-15 13:02:29 -05:00
Peter Thorson 02dd5150fc Chapter 6 (sending/receiving message) of utility_client tutorial 2014-11-15 11:22:08 -05:00
Peter Thorson 5fe6f8338d Disable SSLv3 in example servers 2014-11-04 12:26:07 -05:00
Peter Thorson 4100fc3ce7 normalize copyright dates and prep release version 2014-11-04 07:31:24 -05:00
Dmitry Novikov f7aeeaaa30 Using std/boost make_shared for creating shared pointers
Fixed boost::function nulling issue
2014-10-08 16:11:46 +04:00
Peter Thorson e8d25d22bc adds documentation and removes unused parameters references #376 2014-10-07 10:04:54 -04:00
Peter Thorson 6c242b205b detab entire project references #376 2014-10-06 18:33:55 -04:00
Peter Thorson e7ce038207 remove unused file 2014-04-10 10:53:41 -05:00
Peter Thorson aaed2c4950 fix whitespace 2014-04-10 10:20:26 -05:00
Peter Thorson 64fffeda9f Add combination plain+TLS echo example 2014-04-10 10:19:30 -05:00
Peter Thorson beaa6e98cc testee server defaults changes 2014-03-27 07:43:36 -05:00
Peter Thorson aabf87b6b1 add missing tls libraries 2014-03-25 19:35:07 -05:00
Peter Thorson cfabe17e83 Merge branch 'master' into permessage-deflate
Conflicts:
	changelog.md
2014-03-25 19:16:19 -05:00
Peter Thorson b2d698d3ca include hdl in message actions
This is not strictly necessary for the broadcast server example. As
this example is commonly used as a starting point for new programs the
lack of hdl on message action is a source of surprising behavior.
2014-03-06 11:59:38 -06:00
Peter Thorson faad2ec854 add copyright info to debug client 2014-03-02 19:43:25 -06:00
Peter Thorson dc06049df9 add debug server example 2014-03-02 19:43:11 -06:00
Peter Thorson a5a30e554e rename app_client to utility_client and set utility_client to be the final step of the utility_client tutorial 2014-03-02 19:21:17 -06:00
Peter Thorson 9c8762c961 rename old utility client to debug client 2014-03-02 19:20:42 -06:00
Peter Thorson 09940a5c0b Corrects more obscure shadowed variables cases 2014-02-02 13:12:52 -06:00
Peter Thorson bb21e3cf95 Fix use of variable names that shadow function parameters. references #318 2014-02-02 11:10:39 -06:00