Commit graph

488 commits

Author SHA1 Message Date
eidheim
57a0c83f64 Slightly improved default_resource example 2017-07-04 14:25:44 +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
0662cbdfb7 Added timeout to Server::Response::send, and some cleanup 2017-07-04 11:21:31 +02:00
eidheim
cc1a8fc614 The function Server::send was moved to Server::Response::send 2017-07-04 10:14:58 +02:00
eidheim
a69e32290f Server::send response parameter changed to const. Some cleanup of examples related to this. 2017-07-04 09:17:36 +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
026f47f195 ClientBase now derives from and use std::enable_shared_from_this 2017-07-03 18:00:24 +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
2bb51a9fb0 Added crt and key files to .gitignore 2017-07-03 14:25:48 +02:00
eidheim
b3a1d48c0a Callback shared_ptr parameters are now shared_ptr& 2017-07-03 14:25:48 +02:00
eidheim
0c9cb000b4 Server::Request::path is split into path and query_string 2017-07-03 14:25:48 +02:00
eidheim
d1798396ac Config::thread_pool_size is no longer checked if io_service is set (that is, when external io_service is used) before calling start 2017-07-03 10:22:44 +02:00
eidheim
b4756d0de3 Removed erroneous content type from examples 2017-07-01 08:40:30 +02:00
eidheim
f746027d37 Added error checks to Base64 encode and decode 2017-06-30 19:55:16 +02:00
eidheim
2d3062265d Added longer Base64 decode/encode test 2017-06-29 12:46:54 +02:00
eidheim
f4b46cd3dc Updated README.md to include standalone asio 2017-06-28 08:27:52 +02:00
eidheim
e50d2fc63a Added .clang-format file and applied style to source files 2017-06-26 15:23:29 +02:00
eidheim
3ee9f8dc52 Added all header files to cmake install target. Also added -O3 to one test on travis 2017-06-26 11:50:21 +02:00
eidheim
bf379ebcba Server::Response::write convenience functions no longer write Content-Length if close_connection_after_response is set. Also added some doxygen comments 2017-06-26 07:16:50 +02:00
eidheim
98d9617244 Added QueryString class with create and parse functions to utility.hpp 2017-06-25 16:43:49 +02:00
eidheim
1d9e900f44 Added Percent::encode 2017-06-25 14:32:38 +02:00
eidheim
48d74a974a Server::Response::write convenience functions now always add Content-Length header field if it does not exists and if chunked transfer encoding is not used 2017-06-25 09:21:00 +02:00
eidheim
985809791c Resolved unambiguous Server::Response::write() functions 2017-06-25 08:46:50 +02:00
eidheim
362c1a2591 Now closes unwanted client connections when a request is finished. Also added additional tests 2017-06-25 07:20:03 +02:00
eidheim
20d3c44366 *Fixes #135: memory leak that was introduces Jun 17, 2017 in e1aebba344 2017-06-24 13:19:53 +02:00
eidheim
c9c6ee3d98 Removed unnecessary includes 2017-06-24 10:46:42 +02:00
eidheim
0a72f6f280 Further cleanup of examples 2017-06-23 16:28:25 +02:00
eidheim
850dcd6601 Cleanup of examples 2017-06-23 10:28:29 +02:00
eidheim
dcbb45175a Added convenience functions to examples 2017-06-23 08:05:48 +02:00
eidheim
6cf3be082d Minor change to include guard in crypto.hpp 2017-06-23 07:14:22 +02:00
eidheim
8ec36d19fd Changed some parameters from std::iostream to std::istream in Client and Server 2017-06-23 07:00:16 +02:00
eidheim
361ac21518 Cleanup of synchronous Client::request functions 2017-06-22 22:32:51 +02:00
eidheim
337ee19cef Correction of Server::Response::write 2017-06-22 22:23:07 +02:00
eidheim
6b7fd993cf Added convenience function Client::Response::Content::string() 2017-06-22 22:00:59 +02:00
eidheim
4efdc095bd Added convenience write functions to Server::response 2017-06-22 21:46:01 +02:00
eidheim
d9faf1a6cb Added Status Code header 2017-06-22 18:06:40 +02:00
eidheim
d553ca7a89 Cleanup of parse_query_string and fixed a potential segmentation fault 2017-06-22 14:44:55 +02:00
eidheim
ba4eec7ebe Created Utility.hpp and moved some code into this file. Also improved parse_query_string. 2017-06-22 12:08:56 +02:00
eidheim
62da9daf87 Added Server::on_error and async client request examples 2017-06-20 14:36:05 +02:00
eidheim
1d34b7f3de Minor change in io_test.cpp 2017-06-19 12:37:50 +02:00
eidheim
52ff2787bd Removed use of boost::shared_mutex (in Client). Stopping request handlers, if needed, is now up to the user of the library. If io_service is running on multiple threads, a shared_mutex is needed, otherwise, regular mutex is adequate. 2017-06-19 06:52:30 +02:00
eidheim
fae8e07faa Removed dependency of boost::string_ref if USE_STANDALONE_ASIO is defined 2017-06-18 08:11:27 +02:00
eidheim
e1aebba344 Fixes #114: added support for async client requests. Also includes some cleanup, support for parallel requests, and client reconnect 2017-06-17 11:52:13 +02:00
eidheim
f5ba673350 Further cleanup of Client 2017-06-12 11:52:37 +02:00
eidheim
e2981c340b Cleanup of Client in preparation for async request 2017-06-12 10:53:22 +02:00
eidheim
2096017b24 Standalone asio correction in Client 2017-06-12 09:42:29 +02:00
eidheim
944c7fe370 Client::resolver is no longer a member variable 2017-06-12 08:32:27 +02:00
eidheim
a0cd7520ba Made Client::create_request_header const, and cleanup of indentations in Client 2017-06-12 08:22:40 +02:00