Commit graph

44 commits

Author SHA1 Message Date
eidheim
66b6be499d Client now supports event streams with \r\n line endings in addition to regular \n 2019-07-10 15:08:24 +02:00
eidheim
d9d554b1b5 Client: added support for non-standard line endings in response status and header 2019-06-24 19:48:11 +02:00
eidheim
31e6819b42 Added SimpleWeb::error, and simplified request size checks on server 2019-06-23 20:27:54 +02:00
eidheim
1a56f4810e Resolve g++ compilation error when using standalone asio 2019-06-23 13:05:26 +02:00
eidheim
18808121ed Added missing include 2019-06-23 12:46:21 +02:00
eidheim
b1d9476ff1 Client: added support for server-sent events, and improved the chunked transfer code. Also some cleanup of especially the client code, and added a few additional tests. 2019-06-23 12:41:32 +02:00
eidheim
1f699fc304 Related to #246 : added test where multiple clients sends posts concurrently to a server 2019-06-13 19:37:43 +02:00
eidheim
5087f5d3df Added support for new asio api 2019-04-10 11:07:33 +02:00
eidheim
e716cd9764 Improved ASSERT macro, and renamed tests/check.hpp to tests/assert.hpp 2019-03-23 13:46:31 +01:00
Andrey Potapov
5db5031558 done 2019-02-13 16:29:27 +01:00
Alex Fraser
6b91839cb6 Allow calling Response::send multiple times: copy the buffer before async_write 2018-06-03 12:10:18 +02:00
eidheim
c126eb76b9 Added chunked transfer tests 2017-11-19 18:03:28 +01:00
eidheim
ccce9d1fdf Added Request::remote_endpoint tests to io_test 2017-11-15 07:40:02 +01:00
eidheim
9cf3dd68ab Removed unnecessary: return 0; 2017-09-26 09:39:20 +02:00
knowledge4igor
3ab6cd8a39 Change 'typedef' constructions to type aliases 2017-09-05 01:32:21 +03:00
eidheim
3ba494e0ac Minor comment cleanup 2017-07-21 12:54:17 +02:00
eidheim
e3789b6d4d ScopeRunner::stop now returns if count is already negative 2017-07-20 18:32:35 +02:00
eidheim
474fab90f3 Renamed ScopesContinue to ScopeRunner, and some related cleanup 2017-07-20 17:21:19 +02:00
eidheim
8f5a644a2a Minor addition to ScopesContinue test 2017-07-20 11:53: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
eeaf66cf2c Fixes #142: a new socket is created when a https connection is reconnected, since a second SSL handshake cannot be made on the same socket. Also now removing failed connections from the connections collection. 2017-07-15 08:45:06 +02:00
eidheim
c03e378e69 Comments addition and cleanup 2017-07-10 11:12:10 +02:00
eidheim
490e33e2d1 Client::close renamed to Client::stop 2017-07-07 23:35:14 +02:00
eidheim
7d5599b8e5 Added Server::stop test 2017-07-07 22:23:39 +02:00
eidheim
06d3c701e1 Fixed io_test (out of stack?), also fixed concurrent sync requests count on request error. 2017-07-07 19:37:20 +02:00
eidheim
fd764d908c Synchronous client request calls is now safe to use concurrently 2017-07-07 17:16:53 +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
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
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
e50d2fc63a Added .clang-format file and applied style to source files 2017-06-26 15:23:29 +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
362c1a2591 Now closes unwanted client connections when a request is finished. Also added additional tests 2017-06-25 07:20:03 +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
1d34b7f3de Minor change in io_test.cpp 2017-06-19 12:37:50 +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
6c3a59d9ba Cleanup of server-constructors. Previous constructors have been marked as deprecated. 2016-12-29 09:53:58 +01:00
eidheim
302f980cf3 Added extra test: check if the stream version of the client request methods works if called first 2016-11-26 10:45:17 +01:00
eidheim
74d7ca0cdb Added Client::request stream content test as suggested in #87 2016-11-23 12:24:55 +01:00
eidheim
d6f3d55019 Renamed test folder to tests 2016-08-03 12:15:32 +02:00
Renamed from test/io_test.cpp (Browse further)