Commit graph

49 commits

Author SHA1 Message Date
eidheim
31e6819b42 Added SimpleWeb::error, and simplified request size checks on server 2019-06-23 20:27:54 +02:00
eidheim
f52c8a020b Cleanup of start and its related functions. Also removed unused lambda captures. 2018-05-05 10:05:11 +02:00
eidheim
0c8da107a6 Rename ServerBase::read_request_and_content to ServerBase::read, and ServerBase::write_response to ServerBase::write 2017-11-19 18:03:28 +01:00
eidheim
6e0a1ec9e8 Fixes issue mentioned in #164: remote endpoint address and port was not correctly set. Request::remote_endpoint_address and Request::remote_endpoint_port are now functions instead of variables in order to reduce unnecessary instructions. 2017-11-05 18:48:21 +01:00
eidheim
bc4c49134d Removed unnecessary cstddef includes 2017-09-30 12:08:53 +02:00
knowledge4igor
2cfaa0e2a0 Mini refactoring: using std::size_t and std::numeric_limits 2017-09-25 23:33:31 +03:00
eidheim
69f945f686 Fixes #155: added max streambuf config items to limit large requests/responses if needed 2017-09-25 09:58:50 +02:00
knowledge4igor
3ab6cd8a39 Change 'typedef' constructions to type aliases 2017-09-05 01:32:21 +03:00
eidheim
7c2f714949 noexcept cleanup 2017-07-22 13:33:32 +02:00
eidheim
7dd2d2108a Added noexcept 2017-07-22 12:50:40 +02:00
eidheim
474fab90f3 Renamed ScopesContinue to ScopeRunner, and some related cleanup 2017-07-20 17:21:19 +02:00
eidheim
70e8c3104c Renamed ContinueScopes to ScopesContinue 2017-07-20 11:31:58 +02:00
eidheim
35f835a67b Cancel handlers feature: replaced readers-writer lock with a spinlock implementation 2017-07-20 10:04:05 +02:00
eidheim
d8b8716a17 Session and Connection cleanup 2017-07-10 10:51:24 +02:00
eidheim
dfd7895328 Shared mutex is no longer used when using internal io_service 2017-07-09 09:13:03 +02:00
eidheim
6c2c8d680b No longer stores pointer to Server/Client instance in Session objects. Some other cleanups as well. 2017-07-08 22:21:29 +02:00
eidheim
f3f527467f Now close connections when Server::stop is called 2017-07-08 11:47:05 +02:00
eidheim
9b5063f422 Replaced Server/Client::shared_from_this with asio callback checks if the Server/Client has been destroyed. Also added SharedMutex to utility.hpp. 2017-07-07 11:25:06 +02:00
eidheim
d9416c2566 Added Client::close, and Client::connections and Client::connections_mutex are no longer shared_ptrs 2017-07-04 23:25:30 +02:00
eidheim
68f1e8413a Reverted resource/response function parameter types shared_ptr& to shared_ptr. No real value added here, just more complicated code. Compiler might also optimise the now const lambda captures. 2017-07-04 12:04:07 +02:00
eidheim
c934c9aefe Timeout timers and Client's connection close cleanup 2017-07-04 08:51:15 +02:00
eidheim
30f4f94a03 ServerBase now derives from and use std::enable_shared_from_this 2017-07-03 18:00:49 +02:00
eidheim
1992bbb4b4 Preparation for std::enable_shared_from_this: Server- and Client-constructors are no longer public, use ::create instead 2017-07-03 15:02:35 +02:00
eidheim
80ab651fca Removed deprecated functions 2017-07-03 14:31:22 +02:00
eidheim
b3a1d48c0a Callback shared_ptr parameters are now shared_ptr& 2017-07-03 14:25:48 +02:00
eidheim
e50d2fc63a Added .clang-format file and applied style to source files 2017-06-26 15:23:29 +02:00
eidheim
ec63c4345e Cleanup of #127: using standalone asio. 2017-06-07 19:27:34 +02:00
Sébastien Huss
d50bcabf8e added Support for NO_BOOST 2017-06-05 07:39:58 +02:00
eidheim
ec5eda1521 Minor SocketServer<WSS> constructor cleanup 2016-12-30 10:44:10 +01:00
eidheim
6c3a59d9ba Cleanup of server-constructors. Previous constructors have been marked as deprecated. 2016-12-29 09:53:58 +01:00
eidheim
eef8a10849 Added error reporting through on_error std::function 2016-12-19 08:44:41 +01:00
eidheim
8a88a019ea Minor cleanup, replaced expression with std::min 2016-12-18 17:34:22 +01:00
eidheim
7a97f8218d Added client verification when a verify file is passed to Server<HTTPS>. Also sets session_id_context for session reuse. See #89 2016-12-18 17:22:04 +01:00
eidheim
8a73cb381a Fixes #86: can now set timeout on client requests 2016-11-23 07:01:48 +01:00
David Olszowka
743785b563 Fixed crash if server instance gets deleted after the call to io_service->stop() but before the acceptor gets notified of the stop. 2016-11-10 10:16:49 +01:00
eidheim
3a4b7143cc Can now use external, or reuse, boost::asio::io_service. 2016-10-19 09:53:32 +02:00
Michael Behrns-Miller [bitpost-gentoo]
9701a4504b only use tlsv12, nothing older 2016-08-21 07:42:58 -04:00
eidheim
1268c5b6de Changed private to protected in Server/Client<HTTP/HTTPS> classes, and some cleanup 2016-08-21 10:59:24 +02:00
eidheim
79dca558d2 Resolved most warning messages when compiled with -Wextra or -Weverything. Related to #44 and #45 2016-05-02 13:12:57 +02:00
eidheim
a6154c7c5b Added custom response stream and possibility to flush response to clients synchronously and asynchronously. Various speed ups, including reduced use of regex and preprocessing of regex objects. boost::asio::ip::tcp::no_delay is now turned on for both Client and Server. Note: Not backward compatible with earlier versions. 2015-02-20 11:14:39 +01:00
eidheim
db365340bf Added option for verify_file in Server-constructor, and certification/key file and verify_file for Client-constructor (Warning: not tested). Also moved set_timeout_on_socket to the ServerBase. 2014-11-01 18:18:00 +01:00
eidheim
8bc7d3e623 Some bugfixes and cleanup. Added client 2014-08-11 10:03:27 +02:00
eidheim
2bf96a0e83 minor cleanup 2014-08-07 08:30:52 +02:00
eidheim
cdf7114f2d Added possibility of no timeout (=0) 2014-08-05 17:22:55 +02:00
eidheim
b1a91fb923 Added timeouts 2014-08-04 23:12:23 +02:00
eidheim
7a7956b700 removed 'using namespace' from .hpp-files 2014-07-14 13:27:06 +02:00
eidheim
f018ce81ff minor changes 2014-07-13 01:13:05 +02:00
Ole Christian Eidheim
625de45065 Update server_https.hpp 2014-07-13 01:10:05 +02:00
eidheim
401b9bbc69 added HTTPS support 2014-07-12 21:19:03 +02:00