forked from boostorg/beast
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:
@@ -744,11 +744,12 @@ public:
|
||||
});
|
||||
BEAST_EXPECT(ws.rd_block_);
|
||||
ws.async_write(buffer(s),
|
||||
[&](error_code ec)
|
||||
[&](error_code ec, std::size_t n)
|
||||
{
|
||||
if(ec)
|
||||
BOOST_THROW_EXCEPTION(
|
||||
system_error{ec});
|
||||
BEAST_EXPECT(n == s.size());
|
||||
++count;
|
||||
});
|
||||
BEAST_EXPECT(ws.wr_block_);
|
||||
|
||||
Reference in New Issue
Block a user