Commit Graph

1645 Commits

Author SHA1 Message Date
Peter Thorson ee74047c2d Merge pull request #645 from alex-che/integration_tests_sleep
Fix refused client connection due to servers not yet started
2017-06-11 16:34:49 -05:00
Peter Thorson 2819d364d9 Merge branch 'develop' into integration_tests_sleep 2017-06-11 16:31:21 -05:00
Peter Thorson d282738c81 Merge branch 'pr/643' into develop 2017-06-11 16:28:58 -05:00
Peter Thorson a32eb0887b change log entry for PR 2017-06-11 16:28:47 -05:00
Peter Thorson 6645fcb390 Merge pull request #646 from alex-che/timers_tests_sleep
Fix the tls_handshake_timeout unit test failing due to server thread …
2017-06-11 16:18:00 -05:00
Peter Thorson 29bb4ada91 Merge branch 'pr/647' into develop 2017-06-11 16:16:38 -05:00
Peter Thorson ac9164c3b5 update changelog for PR 2017-06-11 16:16:13 -05:00
Peter Thorson 4cab5e5c0c minor adjustments to recent extension negotiation related fixes, refactor a bit more extension negotiation code to be simpler 2017-06-11 16:13:25 -05:00
Peter Thorson 16d126ee61 Remove custom handling of SSL_R_SHORT_READ errors. fixes #599 2017-06-11 15:41:06 -05:00
Peter Thorson 9ddb300d87 Update permessage-deflate support to reflect that zlib doesn't support a 256 bit window. Improve extension negotiation error checking and documentation. fixes #596 fixes #653 2017-06-11 15:24:43 -05:00
Alex Korotkin 527f401049 Fix unitialized shared_ptr in mock_endpoint 2017-05-17 09:54:14 +03:00
Alex Korotkin 00456642fa Fix the tls_handshake_timeout unit test failing due to server thread not having enough time to start 2017-05-17 09:48:33 +03:00
Alex Korotkin 7be37565ca Fix refused client connection due to servers not yet started
The server thread in a unit test may not have enough time to start and the
ongoing client connection will be refused. Fix this by adding sleep.
2017-05-16 18:13:11 +03:00
Alex Korotkin 5675036891 Fix unit test timers clashing between tests
If unit tests run long enough, then test timers fired for former unit tests can start to fail while running latter unit tests.
2017-05-16 16:51:43 +03:00
Peter Thorson 37ce8abc77 Merge branch 'pr/593' into develop 2016-10-14 08:28:55 -05:00
Peter Thorson abf927bb24 Fix some bugs, normalize code style, update documentation, add tests
Method needs to be public to be useful, updated return type to const
reference for efficiency
2016-10-14 08:27:06 -05:00
Jupp Müller e1f75756d1 Expose HTTP request headers
This change allows users to get a full list of HTTP request headers
allowing libraries that build on top of websocketpp to pass those on
to their users without exposing access to the already existing getter
methods.
2016-10-14 13:17:28 +02:00
Peter Thorson 322e3bafbf Update telemetry_client to use Sleep on windows references #574 2016-10-04 07:41:02 -05:00
Peter Thorson 9019af0070 Add FAQ entry 2016-10-03 19:04:27 -05:00
Peter Thorson e65b277017 Remove catching websocketpp::lib::error_code in examples, fixes #584
A few versions ago the library was standardized to only throw
websocketpp::exception. Not all example code was updated.
2016-10-03 19:04:12 -05:00
Peter Thorson 8434139b67 Add first draft of print_client and print_client_tls 2016-06-10 07:24:36 -04:00
Peter Thorson d4a4b79684 update changelog for recent PR 2016-06-09 09:22:17 -04:00
Peter Thorson 6b09310479 Merge pull request #553 from yeswalrus/fix-tls-crash
Fix server_endpoint crash on connection failure
2016-06-09 09:08:12 -04:00
Peter Thorson 2b310fa80b Merge branch 'develop' of https://github.com/zaphoyd/websocketpp into develop 2016-05-25 08:11:20 -04:00
Peter Thorson 0bb33e4bca Change default listen backlog to socket_base::max_connections from 0, fixes #549
After a change in Linux Kernel 4.4 the value of 0 causes all
connections to be rejected rather than the default value being used.
The default is now the asio::socket_base::max_connections value instead
(which is the default asio uses when no value is provided).
Documentation has been updated accordingly.
2016-05-25 08:10:47 -04:00
Walter Gray ebd0afd67d Check the return of get_connection, raise an appropriate error if it failed. 2016-05-19 16:00:20 -07:00
Walter Gray 5f42305bbd remove trailing whitespaces 2016-05-19 13:47:20 -07:00
Peter Thorson a2f182733a Merge pull request #550 from wal-rus/fix-cmake
Fix CMake config files
2016-05-18 08:38:11 -04:00
Walter Gray 59fb9ece5d Added interface target to config file for cmake versions > 3.0 2016-05-11 16:54:41 -07:00
Walter Gray 73c3b81411 Added include directories to targets (How was this ever working?) 2016-05-11 16:54:40 -07:00
Walter Gray cc851aa167 remove whitespace at end of lines in CMakeHelpers.cmake 2016-05-11 16:54:39 -07:00
Walter Gray 0f2df92ae4 Use CMakePackageConfigHelpers, make websocketpp-config.cmake.in relocatable 2016-05-11 16:54:39 -07:00
Walter Gray 6b702cc050 Updated minimum required version to 2.8.8, Added VERSION argument to project if supported. 2016-05-11 16:54:38 -07:00
Walter Gray 92c1f0c415 Fix default CMAKE_INSTALL_PREFIX setting on windows 2016-05-10 13:44:25 -07:00
Peter Thorson 9e5163364f Add logging reference documentation 2016-04-27 09:00:30 -04:00
Peter Thorson 8f0fab3e77 Update docs & FAQ 2016-04-23 08:05:01 -04:00
Peter Thorson 94fe989840 Store loggers in shared pointers references #501 #537
adds related changelog entry and fix one overzealous find and replace
operation.
2016-04-06 09:38:45 -04:00
Peter Thorson 9da5ac93ec Merge pull request #539 from jupp0r/feature/shutdown-fix-for-shared-ioservice
Fix shutdown bugs by holding loggers in shared_ptrs
2016-04-06 09:27:35 -04:00
Peter Thorson 891a7a5ed5 documentation 2016-04-03 11:39:46 -04:00
Jupp Müller 1013aa89bc Fix shutdown bugs by holding loggers in shared_ptrs
This change fixes a shutdown crash occuring when using an
external io_service to drive a websocketpp server. The crash
itself is reproduced by the following code:

```

int main(int argc, const char * argv[])
{
    boost::asio::io_service ioService;
        std::unique_ptr<boost::asio::io_service::work> ioServiceWork(new boost::asio::io_service::work(ioService));
            std::thread ioServiceThread(boost::bind(&boost::asio::io_service::run, &ioService));

    {
        auto server = std::unique_ptr<websocketpp::server<websocketpp::config::asio>>(new websocketpp::server<websocketpp::config::asio>());
        server->init_asio(&ioService);
        server->listen(0);
        server->start_accept();

        server->stop();
    }

    ioServiceWork.reset();
    ioService.stop();
    ioServiceThread.join();

    return 0;
}
```

The cause of the crash is a dangling pointer to alog or elog objects in endpoints.
This is mitigated by storing logging objects as shared_ptrs. This ensures that
they are kept alive and able to log even if their owning structures have already
been deallocated.
2016-03-31 16:49:16 +02:00
Peter Thorson 366679b50a Update docs and changelog 2016-03-31 09:57:45 -04:00
Peter Thorson 94cc1ec5cb Fix an issue detecting which version of the chrono library to use references #512
If we are using Boost for Asio, the
websocketpp::lib::asio::milliseconds function should return a chrono
milliseconds object using whatever chrono library boost is using.

Boost does its own autodetection of the std::chrono library and prefers
it over boost::chrono when available. This change checks which chrono
library boost is using and uses that. Otherwise it falls back to the
websocketpp default.
2016-03-31 09:55:07 -04:00
Peter Thorson 6f128a5499 Move socket_init_handler from pre_init to init_asio #530
pre_init happens after bind/listen/accept, preventing socket options
that affect those system calls from being set in time.
2016-02-26 06:37:34 -05:00
Peter Thorson f5d14f3ad3 Bump develop branch version 2016-02-26 06:30:44 -05:00
Peter Thorson 918745a7ea Add test case for un-setting a handler (with NULL) 2016-02-26 06:20:53 -05:00
Peter Thorson cc7d74d8d0 Set version flags for release 2016-02-22 08:28:27 -05:00
Peter Thorson b154ac5907 Add FAQ entry 2016-02-22 08:28:05 -05:00
Peter Thorson 0348510c8d Fix minor issue in hybi00 subprotocol support patch. Update changelog for recent PRs 2016-02-21 18:30:58 -05:00
Peter Thorson a495c8c529 Merge branch 'develop' of https://github.com/zaphoyd/websocketpp into develop 2016-02-21 18:25:14 -05:00
Peter Thorson fabf8bf1ca clarified debugging output in connection read_handshake 2016-02-21 18:24:57 -05:00