diff --git a/CHANGELOG.md b/CHANGELOG.md index b1980010..bea47518 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +Version 271: + +* Add HTTP async client with system_executor example +* Add WebSocket async client with system_executor example +* Fix data race in HTTP server examples +* Fix data race in WebSocket examples + +-------------------------------------------------------------------------------- + Version 270: * Silence unused variables diff --git a/doc/qbk/02_examples/_examples.qbk b/doc/qbk/02_examples/_examples.qbk index f3a8ce20..f0abbbe1 100644 --- a/doc/qbk/02_examples/_examples.qbk +++ b/doc/qbk/02_examples/_examples.qbk @@ -32,6 +32,10 @@ used to evaluate robustness. All asynchronous clients support timeouts. [HTTP, asynchronous] [[path_link example/http/client/async/http_client_async.cpp http_client_async.cpp]] [[path_link example/http/client/async-ssl/http_client_async_ssl.cpp http_client_async_ssl.cpp]] +][ + [HTTP, asynchronous using __system_executor__] + [] + [[path_link example/http/client/async-ssl-system-executor/http_client_async_ssl_system_executor.cpp http_client_async_ssl_system_executor.cpp]] ][ [HTTP, coroutine] [[path_link example/http/client/coro/http_client_coro.cpp http_client_coro.cpp]] @@ -56,6 +60,10 @@ before disconnecting. All asynchronous clients support timeouts. [WebSocket, asynchronous] [[path_link example/websocket/client/async/websocket_client_async.cpp websocket_client_async.cpp]] [[path_link example/websocket/client/async-ssl/websocket_client_async_ssl.cpp websocket_client_async_ssl.cpp]] +][ + [WebSocket, asynchronous using __system_executor__] + [] + [[path_link example/websocket/client/async-ssl-system-executor/websocket_client_async_ssl_system_executor.cpp websocket_client_async_ssl_system_executor.cpp]] ][ [WebSocket, coroutine] [[path_link example/websocket/client/coro/websocket_client_coro.cpp websocket_client_coro.cpp]] diff --git a/doc/qbk/main.qbk b/doc/qbk/main.qbk index 3cb5d38b..4ab551cb 100644 --- a/doc/qbk/main.qbk +++ b/doc/qbk/main.qbk @@ -59,6 +59,7 @@ [def __ssl_context__ [@boost:/doc/html/boost_asio/reference/ssl__context.html `net::ssl::context`]] [def __ssl_stream__ [@boost:/doc/html/boost_asio/reference/ssl__stream.html `net::ssl::stream`]] [def __streambuf__ [@boost:/doc/html/boost_asio/reference/streambuf.html `net::streambuf`]] +[def __system_executor__ [@boost:/doc/html/boost_asio/reference/system_executor.html `net::system_executor`]] [def __use_future__ [@boost:/doc/html/boost_asio/reference/use_future_t.html `net::use_future`]] [def __yield_context__ [@boost:/doc/html/boost_asio/reference/yield_context.html `net::yield_context`]] diff --git a/example/http/client/CMakeLists.txt b/example/http/client/CMakeLists.txt index a8c09df0..0c9d1815 100644 --- a/example/http/client/CMakeLists.txt +++ b/example/http/client/CMakeLists.txt @@ -14,6 +14,7 @@ add_subdirectory (sync) if (OPENSSL_FOUND) add_subdirectory (async-ssl) + add_subdirectory (async-ssl-system-executor) add_subdirectory (coro-ssl) add_subdirectory (sync-ssl) endif() diff --git a/example/http/client/async-ssl-system-executor/http_client_async_ssl_system_executor.cpp b/example/http/client/async-ssl-system-executor/http_client_async_ssl_system_executor.cpp index b9fe5dfe..19ca0be6 100644 --- a/example/http/client/async-ssl-system-executor/http_client_async_ssl_system_executor.cpp +++ b/example/http/client/async-ssl-system-executor/http_client_async_ssl_system_executor.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/example/websocket/client/async-ssl-system-executor/CMakeLists.txt b/example/websocket/client/async-ssl-system-executor/CMakeLists.txt index 63577367..3a22aade 100644 --- a/example/websocket/client/async-ssl-system-executor/CMakeLists.txt +++ b/example/websocket/client/async-ssl-system-executor/CMakeLists.txt @@ -10,7 +10,7 @@ if (OPENSSL_FOUND) GroupSources(include/boost/beast beast) GroupSources(example/common common) - GroupSources(example/websocket/client/async-ssl "/") + GroupSources(example/websocket/client/async-ssl-system-executor "/") add_executable (websocket-client-async-ssl-system-executor ${BOOST_BEAST_FILES} @@ -19,7 +19,7 @@ if (OPENSSL_FOUND) websocket_client_async_ssl_system_executor.cpp ) - set_property(TARGET websocket-client-async-ssl-system-executor PROPERTY FOLDER "example-websocket-client-system-executor") + set_property(TARGET websocket-client-async-ssl-system-executor PROPERTY FOLDER "example-websocket-client") target_link_libraries (websocket-client-async-ssl-system-executor OpenSSL::SSL OpenSSL::Crypto diff --git a/example/websocket/client/async-ssl-system-executor/websocket_client_async_ssl_system_executor.cpp b/example/websocket/client/async-ssl-system-executor/websocket_client_async_ssl_system_executor.cpp index a87ea430..352bc334 100644 --- a/example/websocket/client/async-ssl-system-executor/websocket_client_async_ssl_system_executor.cpp +++ b/example/websocket/client/async-ssl-system-executor/websocket_client_async_ssl_system_executor.cpp @@ -9,7 +9,7 @@ //------------------------------------------------------------------------------ // -// Example: WebSocket SSL client, asynchronous +// Example: WebSocket SSL client, asynchronous, using system_executor // //------------------------------------------------------------------------------ @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include