WebSocket writes return the bytes transferred (API Change):

* Stream write operations now return the number of bytes
transferred from the caller's input buffers.

Actions Required:

* Modify websocket write completion handlers to receive
  the extra std::size_t bytes_transferred parameter.
This commit is contained in:
Vinnie Falco
2017-09-03 20:05:19 -07:00
parent 942bca0cc3
commit c0e5f14702
19 changed files with 287 additions and 129 deletions
+1 -1
View File
@@ -226,7 +226,7 @@ void echo(stream<boost::asio::ip::tcp::socket>& ws,
multi_buffer& buffer, boost::asio::yield_context yield)
{
ws.async_read(buffer, yield);
std::future<void> fut =
std::future<std::size_t> fut =
ws.async_write(buffer.data(), boost::asio::use_future);
}
//]