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
Peter Thorson
3f913f97ef
update tls version used in tls timer tests
2016-02-21 18:24:37 -05:00
Peter Thorson
ffaeba2ec7
switch comment style in connection tests
2016-02-21 18:24:19 -05:00
Peter Thorson
db304bfec4
Remove the use of cached read and write handlers in the asio transport. references #490 #525
...
There isn't a clean way to implement this performance optimization without adding global state/locking, which performs worse. This should fix
2016-02-21 18:23:58 -05:00
Peter Thorson
d3bec51d25
Merge pull request #518 from lobermann/hixie76-hybi00-subprotocol-support
...
added subprotocol support for hybi00 / hixie76
2016-02-21 13:07:24 -05:00
Peter Thorson
8b672f7372
Merge pull request #524 from xavigibert/fix-uri
...
Fixed uri validator by checking its length.
2016-02-21 13:04:18 -05:00
Xavier Gibert Serra
a4a79f6bf6
Fixed uri validator. This bug caused asan error heap-buffer-overflow when passing a short address.
2016-02-18 08:45:20 -08:00
Peter Thorson
9dc013a3aa
Add an FAQ entry explaining how to use permessage-deflate in 0.6.0 and 0.7.0
2016-02-18 09:11:19 -05:00
Peter Thorson
931ad40b5f
documentation & friend updates
2016-02-18 08:46:15 -05:00
Peter Thorson
842f745e24
Add echo_client example
2016-02-18 08:45:31 -05:00
Lukas Obermann
e6f8766707
added subprotocol support for hybi00 / hixie76
...
This was missing but it is described in the RFC here
https://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00#section-1.9
2016-02-10 17:07:02 +01:00
Peter Thorson
17a2647454
Apply tentative fix for explicitly destroying objects that use io_service before it is deleted
2016-02-08 07:32:57 -05:00
Peter Thorson
323dec4efc
Merge branch 'strand-fix-1' into develop
2016-02-08 07:31:41 -05:00
Peter Thorson
ee343fb282
Adjust use of strand to work better with composite asio operations. references #459
...
particularly affected TLS servers and connection close behavior
2016-02-08 07:31:06 -05:00
Peter Thorson
b76422aa7a
explicitly delete work and resolver object before deleting io_service references #510
2016-02-07 11:58:04 -05:00
Peter Thorson
563fcc6b45
wrap TLS async_shutdown in a strand references #459 #466
2016-02-07 11:26:00 -05:00
Peter Thorson
b6014cc79b
FAQ & Change log minor update
2016-02-02 09:39:12 -05:00
Peter Thorson
d917f0924b
Remove execute permission from sha1.hpp fixes #489
2016-01-31 15:14:44 -05:00
Peter Thorson
e036a5aeab
Also fix this use of auto_ptr
2016-01-31 15:11:33 -05:00
Peter Thorson
ed335a37b5
Replace deprecated use of auto_ptr when unique_ptr is available
2016-01-31 11:07:36 -05:00
Peter Thorson
bb4cbf3d03
Merge branch 'develop' of https://github.com/zaphoyd/websocketpp into develop
2016-01-19 09:34:43 -05:00
Peter Thorson
a388817606
Initial work on utility_server tutorial
2016-01-19 09:33:18 -05:00
Peter Thorson
b373f1ea6b
Merge pull request #509 from mgeier/no-get-uri
...
telemetry_server: Remove unnecessary call to get_uri()
2016-01-19 09:30:23 -05:00
Peter Thorson
28448c77a5
Merge pull request #507 from mgeier/unneeded-typedef
...
Remove unneeded typedef from telemetry_server example
2016-01-19 09:29:07 -05:00
Peter Thorson
ae097d6a93
Merge pull request #508 from mgeier/lock-guard
...
broadcast_server: replace explicit unlock() by scoped unlock
2016-01-19 09:28:56 -05:00
Matthias Geier
02f0026a00
telemetry_server: Remove unnecessary call to get_uri()
2016-01-19 13:22:34 +01:00
Matthias Geier
aac65bdfd0
broadcast_server: replace explicit unlock() by scoped unlock
...
Also: Replace some instances of unique_lock with lock_guard.
2016-01-19 12:31:23 +01:00
Matthias Geier
7b368e67ed
Remove unneeded typedef from telemetry_server example
2016-01-19 10:29:37 +01:00
Peter Thorson
d0802994d8
Merge branch 'pr/502' into develop
2016-01-14 09:12:02 -05:00
Peter Thorson
20cc197967
Fix a few other misc test related things
2016-01-12 10:51:59 -05:00
Gregor Jasny
89df55c577
Register tests to CTest
2016-01-05 09:51:15 +01:00
Peter Thorson
9713455e94
Fix TLS+Asio Standalone builds
2015-12-20 09:36:46 -05:00
Peter Thorson
044eda9cc4
Merge pull request #493 from jchampio/dev/cancel_socket
...
Always log errors when cancelling sockets
2015-12-19 11:52:24 -05:00
Peter Thorson
fc6ec59ab8
more travis updates
2015-12-17 08:11:23 -05:00
Peter Thorson
a01cce3b1a
travis update
2015-12-17 07:32:26 -05:00
Peter Thorson
e1b39037f7
travis config update
2015-12-17 07:30:00 -05:00
Peter Thorson
f54fb0669b
more docs
2015-12-17 07:29:51 -05:00