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:
Vinnie Falco
2017-07-25 08:50:58 -07:00
parent 6e33072832
commit e56d9955de
5 changed files with 69 additions and 52 deletions

View File

@@ -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
});