Gianfranco Costamagna
5c48a114f4
Fix testsuite errors, due to a "Connection: upgrade" seen differently than "Connection: Upgrade"
2018-07-12 19:10:02 +02: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
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
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
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
918745a7ea
Add test case for un-setting a handler (with NULL)
2016-02-26 06:20:53 -05:00
Peter Thorson
3f913f97ef
update tls version used in tls timer tests
2016-02-21 18:24:37 -05:00
Gregor Jasny
89df55c577
Register tests to CTest
2016-01-05 09:51:15 +01:00
Peter Thorson
fb829e0895
Misc changes related to translation of asio transport errors #448
2015-08-20 10:14:55 -04:00
Peter Thorson
ef380f7fff
Add CMake build support for examples and tests, zlib dependencies
2015-07-29 08:57:56 -04: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
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
39dbe3a4e0
adds a vectored write handler for iostream transport
2015-03-04 18:42:55 -06:00
Peter Thorson
4bea90f555
preliminary support for move semantics for endpoints
2015-02-06 07:51:24 -05:00
Peter Thorson
a8d4a9a66a
increase test timeouts to help avoid false positives
2015-01-20 07:17:29 -05:00
Peter Thorson
745ed4f77a
increase test timeout to help fail less on slow travis machines
2015-01-06 17:33:01 -06:00
Peter Thorson
922f1c35bc
add testing system for timer/handshake handler interleaving
...
This interleaving is non-deterministic and pre-0.5 can result in state
errors when timer handers race with read/write handlers. These tests
explicitly and deterministically check all common interleaving for both
clients and servers.
2014-12-11 09:43:01 -05:00
Peter Thorson
bc868a244d
queue for retest
2014-12-08 19:24:10 -05:00
Peter Thorson
18994f7318
Add write_handler to iostream as an ostream replacement
2014-12-04 09:12:57 -05:00
Peter Thorson
7404b506db
Add shutdown handler to iostream transport references #388
2014-12-04 08:15:57 -05:00
Peter Thorson
4100fc3ce7
normalize copyright dates and prep release version
2014-11-04 07:31:24 -05:00
Peter Thorson
d6c9905e80
fixes another shadowing warning
2014-10-07 10:16:28 -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
af7149ae0a
Adds read_all method to iostream transport
...
Adds `connection::read_all(...)` method to iostream transport as a
convenience method for reading all data into the connection buffer
without the end user needing to manually loop on `read_some`.
2014-05-22 21:10:58 -05:00
Peter Thorson
fd0c62a8e4
add TLS config and types to asio integration tests
2014-03-05 07:27:41 -06:00
Peter Thorson
af15537205
add debug header to integration tests
2014-03-02 22:12:14 -06:00
Peter Thorson
fe85de763e
Adds configurable SO_REUSEADDR option. references #311
2014-02-02 18:12:30 -06:00
Peter Thorson
2000746be7
correct misc minor warnings
2014-02-02 15:12:42 -06:00
Peter Thorson
14074666a7
disable some debugging output
2014-02-02 10:55:31 -06:00
Peter Thorson
bb431ee0d2
Fix a crash following use of the stop_listening function.
2014-01-26 20:53:17 -06:00
Peter Thorson
4393a2562b
Add the ability to pause reading on a connection
2014-01-25 18:46:44 -06:00
Peter Thorson
780f7683a4
add typedefs for iostream clients and servers to integration test suite
2014-01-25 18:29:54 -06:00
Peter Thorson
c7fda5a960
remove debug output from test
2013-12-14 09:31:58 -06:00
Peter Thorson
c2f2cb951b
Fixes some calls to empty lib::functions, references #310
2013-12-10 22:02:22 -06:00
Peter Thorson
06cdf43dcf
Add start_perpetual and stop_perpetual to asio transport
...
These may be used to replace manually managed `asio::io_service::work`
objects
2013-11-04 16:50:35 -06:00
Peter Thorson
45a612f44b
additional support for compile time disabling of multithreading features
2013-10-20 12:54:59 -05:00
Peter Thorson
b934e71ace
adjust transport async_accept and async_connect to use connection_ptr instead of connection_hdl
...
prevents a newly created connection_ptr from being destroyed
immediately after accepting or connecting.
2013-10-06 10:51:41 -05:00
Peter Thorson
96f7d0f3f2
catch test error condition better
2013-10-06 10:48:23 -05:00
Peter Thorson
550365df6a
updates iostream tests for new safer/less leaky API
2013-09-28 07:57:38 -05:00
Peter Thorson
3bab403c1b
Refactor asio_transport and add full docs and exception free varient methods
2013-07-27 11:24:24 -05:00
Peter Thorson
c017331959
remove trailing whitespace
2013-07-21 07:49:15 -05:00
Peter Thorson
28ac69c800
temporary workaround for a g++ compile issue
2013-07-09 21:59:28 -05:00
Peter Thorson
b866e4e0ca
Refactors URI to be exception and regex free
2013-07-09 16:50:47 -05:00
Peter Thorson
88fe1bfb1c
Fix issue where pong timeout handler always fired
2013-06-24 14:59:19 -05:00
Peter Thorson
de5684aef3
add test fail handler
2013-06-22 10:50:28 -05:00