Peter Thorson
7c3eb3e6c2
fix log wording
2014-05-22 21:10:57 -05:00
Peter Thorson
7137105a81
documentation updates
2014-04-02 11:57:04 -05:00
Peter Thorson
79c2d09200
remove debug logging from critical paths
2014-03-27 07:43:11 -05:00
Peter Thorson
002d2d0007
force the offset to be calculated first to avoid confusing MSVC's checked iterators references #342
...
Thank you tmoers for reporting
2014-03-25 06:15:40 -05:00
Peter Thorson
cd534ad18e
implements batch sending
...
rather than writing a single message per trip through the underlying
transport, writes are batched and sent as a group. This drastically
improves the system call / application code ratio and tcp packet
utilization rates when sending lots of small messages
2014-03-24 08:04:23 -05:00
Peter Thorson
e2b7a4b9f1
fix whitespace
2014-03-16 09:59:34 -05:00
Peter Thorson
e154d955ec
Use __cplusplus header to enable C++11 language features
2014-03-16 09:26:51 -05:00
Dominik Schmidt
77495d4076
Use _WIN32 instead of WIN32 preprocessor directive and fix warnings
2014-03-14 17:42:05 +01:00
Jeff Mitchell
0f3a36a630
Add define to allow disabling threading entirely, for when using an
...
iostream-based client.
2014-03-12 10:46:33 -04:00
Peter Thorson
edb26d7721
listen errors are now reported to the caller
2014-03-06 19:01:11 -06:00
Peter Thorson
9d8eced9a1
Refactored server_endpoint to allow end users to access start_accept error states references #335
...
also more documentation
2014-03-05 08:06:14 -06:00
Aydan Yumerefendi
c3dfb25181
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
websocketpp/roles/server_endpoint.hpp
2014-03-04 21:19:24 -05:00
Aydan Yumerefendi
5a5d8321bd
Require a valid con before calling terminate
...
If get_connection returns null, e.g., if during stop the tls_init
handler is removed from the server, con->terminate will cause a crash.
2014-03-04 21:02:42 -05:00
Peter Thorson
b805689f9c
whitespace and don't accept if we know the transport isn't listening references #334
2014-03-04 06:45:00 -06:00
Peter Thorson
7eedf25500
Merge pull request #334 from aydany/master
...
Avoid leak when stopping server
2014-03-04 06:18:34 -06:00
Aydan Yumerefendi
3ca53d0064
Avoid leak when stopping server
...
If accept fails, e.g., because the server is no longer listening the
connection object is not terminated and it results in a memory leak:
connection -> handler -> connection.
2014-03-03 21:51:56 -05:00
Peter Thorson
5e2fadd826
pass better information about TLS handshake failures
2014-03-03 17:09:55 -06:00
Peter Thorson
840bb6b59e
code style and whitespace
2014-03-03 10:32:04 -06:00
Aydan Yumerefendi
337bf2fb0a
Fix memory leak on create
...
If the socket fails to initialize, e.g., by omitting the tis init
handler, the connection is leaked, since there is a circular reference
between the connection and its async_read/async_write handlers. To fix
this, check the error code, and reset the handler is an error has
occurred.
2014-03-03 11:08:24 -05:00
Peter Thorson
c5b5492e5c
fix memory leak when a connection fails references #323
2014-03-02 22:12:38 -06:00
Peter Thorson
bdeb4ad680
code style and documentation
2014-03-02 21:39:34 -06:00
Peter Thorson
5f56976290
Add method to look up a human readable string given a close code value
2014-03-02 12:19:50 -06:00
Peter Thorson
86325b1838
cleans up the handling of TLS related transport errors
...
Specifically: TLS short read is separated from other TLS errors. Other
TLS errors are also not separated from generic “pass through” errors.
TLS short read is now considered “expected” during socket shutdown and
is not reported as an error.
2014-02-28 09:02:26 -06:00
Peter Thorson
2d2312a1d7
add socket/security policies to translate asio -> websocketpp error codes
...
The reason these were added to the socket policies rather than higher
up is that in some cases translating error codes requires information
from headers and libraries that are not present except when certain
socket policies are being used. For example, SSL/TLS related errors can
only be translated using openssl, which is only pulled in with the TLS
socket policy.
2014-02-28 09:00:45 -06:00
Peter Thorson
afc28be004
whitespace
2014-02-28 08:27:29 -06:00
Peter Thorson
b7c5a2e791
tls short read in state closed is no longer an error
2014-02-28 08:27:14 -06:00
Peter Thorson
d36925ce7d
Add new generic TLS error code
2014-02-28 08:26:50 -06:00
Peter Thorson
713a05679c
Merge pull request #325 from zaphoyd/max-message-size
...
error handling changes that ended up on wrong branch
2014-02-18 07:59:20 -06:00
Peter Thorson
0fecf023ef
refactor connection error handling code
2014-02-18 08:01:16 -06:00
Peter Thorson
ffdf5f842b
reclassify action after shutdown as info rather than fatal references #62
2014-02-18 07:59:43 -06:00
Peter Thorson
d425caea80
Fix misclassified error log entry
2014-02-18 07:58:49 -06:00
Peter Thorson
ce2c1d6e34
whitespace
2014-02-13 11:18:44 -06:00
Peter Thorson
7ceeaa4f9c
fix documentation spelling error
2014-02-13 11:10:47 -06:00
Peter Thorson
883410bb77
Fix an issue where custom timeout values weren't being propagated from endpoints to new connections
2014-02-12 15:07:09 -06:00
Peter Thorson
180543b9e6
Adds the ability to specify a maximum message size
2014-02-10 09:21:07 -06:00
Peter Thorson
7c08cae15b
fix bug that caused all error close frames to have a blank code
2014-02-10 09:17:43 -06:00
Peter Thorson
81e0c44b34
update debug config with max_message_size constant
2014-02-10 09:16:47 -06:00
Peter Thorson
722a67a910
add message payload size reservation
2014-02-10 08:39:20 -06:00
Peter Thorson
ba6320ba1c
Add maximum message size functionality to processors
2014-02-10 08:38:54 -06:00
Peter Thorson
d9aa498310
whitespace cleanup
2014-02-10 08:37:47 -06:00
Peter Thorson
ba90910f6e
Fix an issue where set_open_handshake_timeout was ignored for servers
2014-02-05 21:00:30 -06:00
Peter Thorson
bee2c03aa0
code style updates
2014-02-05 20:56:54 -06:00
Peter Thorson
8e86ddcf5a
fix typos in comments
2014-02-02 19:28:23 -06:00
Peter Thorson
fe85de763e
Adds configurable SO_REUSEADDR option. references #311
2014-02-02 18:12:30 -06:00
Peter Thorson
ca97dd1fb8
Switch to c-based tolower rather than c++ to avoid confusing Visual Studio references #287
2014-02-02 17:04:50 -06:00
Peter Thorson
c7ec97795a
add C++11 nullptr support detection
2014-02-02 17:03:41 -06:00
Peter Thorson
6ee7c368bb
remove unused variables
2014-02-02 15:14:12 -06:00
Peter Thorson
2000746be7
correct misc minor warnings
2014-02-02 15:12:42 -06:00
Peter Thorson
c84cc110aa
Corrects more obscure shadowed variable cases 2
2014-02-02 13:17:17 -06:00
Peter Thorson
09940a5c0b
Corrects more obscure shadowed variables cases
2014-02-02 13:12:52 -06:00