forked from boostorg/beast
websocket read returns the number of bytes inserted (API Change):
* read and async_read now return the number of bytes inserted into the caller's buffer. Actions Required: * Change the signature of completion handlers used with websocket::stream::async_read to void(error_code, std::size_t)
This commit is contained in:
@@ -209,7 +209,7 @@ boost::asio::ip::tcp::socket sock{ios};
|
||||
//[ws_snippet_20
|
||||
multi_buffer buffer;
|
||||
ws.async_read(buffer,
|
||||
[](error_code)
|
||||
[](error_code, std::size_t)
|
||||
{
|
||||
// Do something with the buffer
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user