Fix async_read_some handler signature

This commit is contained in:
Vinnie Falco
2017-08-18 11:12:12 -07:00
parent 0b83eb8e1e
commit 7a96dc4e11
3 changed files with 16 additions and 8 deletions

View File

@ -1,3 +1,11 @@
Version 109:
WebSocket:
* Fix async_read_some handler signature
--------------------------------------------------------------------------------
Version 108:
* Fix argument parsing in HTTP examples

View File

@ -861,8 +861,8 @@ async_read_some(
"AsyncStream requirements requirements not met");
static_assert(is_dynamic_buffer<DynamicBuffer>::value,
"DynamicBuffer requirements not met");
async_completion<
ReadHandler, void(error_code)> init{handler};
async_completion<ReadHandler,
void(error_code, std::size_t)> init{handler};
read_op<
DynamicBuffer,
handler_type<ReadHandler,

View File

@ -121,12 +121,12 @@ boost::asio::ip::tcp::socket sock{ios};
// Construct the stream, transferring ownership of the socket
stream<boost::asio::ip::tcp::socket> ws{std::move(sock)};
// Accept the request from our message. Clients SHOULD NOT
// begin sending WebSocket frames until the server has
// provided a response, but just in case they did, we pass
// any leftovers in the buffer to the accept function.
//
ws.accept(req, buffer.data());
// Clients SHOULD NOT begin sending WebSocket
// frames until the server has provided a response.
BOOST_ASSERT(buffer.size() == 0);
// Accept the upgrade request
ws.accept(req);
}
else
{