Skip to content

Commit

Permalink
Merge branch 'boostorg:develop' into zig-pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane authored Dec 27, 2023
2 parents 5116b9b + b1779ce commit 3af9007
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 17 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 351:

* Use the explicit type std::size_t when completing transfer_op

--------------------------------------------------------------------------------

Version 350:

* Allocation and invocation hooks are removed
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ endfunction()
#
#-------------------------------------------------------------------------------

project (Beast VERSION 350)
project (Beast VERSION 351)

set_property (GLOBAL PROPERTY USE_FOLDERS ON)
option (Beast_BUILD_EXAMPLES "Build examples" ON)
Expand Down
2 changes: 1 addition & 1 deletion doc/qbk/02_examples/_examples.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ used to evaluate robustness. All asynchronous clients support timeouts.
[[path_link example/http/client/body/json_body.hpp example/http/client/body/json_client.cpp]]
][
[HTTP client for all methods (synchronous)]
[[path_link example/http/client/methods/http_client_methods.hpp example/http/client/methods/http_client_methods.cpp]]
[[path_link example/http/client/methods/http_client_methods.cpp example/http/client/methods/http_client_methods.cpp]]
]]

These WebSocket clients connect to a
Expand Down
1 change: 1 addition & 0 deletions doc/qbk/release_notes.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

[*Fixes]

* [issue 2766] Use the explicit type std::size_t when completing transfer_op
* [issue 2727] Replaced `BOOST_ASIO_INITFN_RESULT_TYPE` with `BOOST_ASIO_INITFN_AUTO_RES`
* [issue 2715] `server-flex-awaitable` example resets parser

Expand Down
32 changes: 18 additions & 14 deletions example/websocket/server/awaitable/websocket_server_awaitable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ do_session(stream ws)
// Accept the websocket handshake
co_await ws.async_accept();

for(;;)
try {
try
{
for(;;)
{
// This buffer will hold the incoming message
beast::flat_buffer buffer;

Expand All @@ -74,14 +76,13 @@ do_session(stream ws)
// Echo the message back
ws.text(ws.got_text());
co_await ws.async_write(buffer.data());

}
catch(boost::system::system_error & se)
{
if (se.code() != websocket::error::closed)
throw;

}
}
catch(const boost::system::system_error & se)
{
if (se.code() != websocket::error::closed)
throw;
}
}

//------------------------------------------------------------------------------
Expand Down Expand Up @@ -111,12 +112,15 @@ do_listen(
do_session(stream(co_await acceptor.async_accept())),
[](std::exception_ptr e)
{
try
if (e)
{
std::rethrow_exception(e);
}
catch (std::exception &e) {
std::cerr << "Error in session: " << e.what() << "\n";
try
{
std::rethrow_exception(e);
}
catch (std::exception &e) {
std::cerr << "Error in session: " << e.what() << "\n";
}
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion include/boost/beast/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
This is a simple integer that is incremented by one every
time a set of code changes is merged to the develop branch.
*/
#define BOOST_BEAST_VERSION 350
#define BOOST_BEAST_VERSION 351

// A string describing BOOST_BEAST_VERSION, that can be used in http headers.
#define BOOST_BEAST_VERSION_STRING "Boost.Beast/" BOOST_STRINGIZE(BOOST_BEAST_VERSION)
Expand Down

0 comments on commit 3af9007

Please sign in to comment.