mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 12:57:31 +02:00
Fix async_read_some handler signature
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
Version 109:
|
||||||
|
|
||||||
|
WebSocket:
|
||||||
|
|
||||||
|
* Fix async_read_some handler signature
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Version 108:
|
Version 108:
|
||||||
|
|
||||||
* Fix argument parsing in HTTP examples
|
* Fix argument parsing in HTTP examples
|
||||||
|
@ -861,8 +861,8 @@ async_read_some(
|
|||||||
"AsyncStream requirements requirements not met");
|
"AsyncStream requirements requirements not met");
|
||||||
static_assert(is_dynamic_buffer<DynamicBuffer>::value,
|
static_assert(is_dynamic_buffer<DynamicBuffer>::value,
|
||||||
"DynamicBuffer requirements not met");
|
"DynamicBuffer requirements not met");
|
||||||
async_completion<
|
async_completion<ReadHandler,
|
||||||
ReadHandler, void(error_code)> init{handler};
|
void(error_code, std::size_t)> init{handler};
|
||||||
read_op<
|
read_op<
|
||||||
DynamicBuffer,
|
DynamicBuffer,
|
||||||
handler_type<ReadHandler,
|
handler_type<ReadHandler,
|
||||||
|
@ -121,12 +121,12 @@ boost::asio::ip::tcp::socket sock{ios};
|
|||||||
// Construct the stream, transferring ownership of the socket
|
// Construct the stream, transferring ownership of the socket
|
||||||
stream<boost::asio::ip::tcp::socket> ws{std::move(sock)};
|
stream<boost::asio::ip::tcp::socket> ws{std::move(sock)};
|
||||||
|
|
||||||
// Accept the request from our message. Clients SHOULD NOT
|
// Clients SHOULD NOT begin sending WebSocket
|
||||||
// begin sending WebSocket frames until the server has
|
// frames until the server has provided a response.
|
||||||
// provided a response, but just in case they did, we pass
|
BOOST_ASSERT(buffer.size() == 0);
|
||||||
// any leftovers in the buffer to the accept function.
|
|
||||||
//
|
// Accept the upgrade request
|
||||||
ws.accept(req, buffer.data());
|
ws.accept(req);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user