forked from boostorg/beast
Remove opcode from read, async_read (API Change):
fix #446 * Read signatures no longer include `opcode` * stream::got_binary and stream::got_text inform the caller if the current incoming message is binary or text. Actions Required: * Remove the `opcode` reference parameter from calls to synchronous and asynchronous read functions, replace the logic with calls to stream::got_binary and stream::got_text instead.
This commit is contained in:
@@ -207,15 +207,14 @@ private:
|
||||
}
|
||||
for(;;)
|
||||
{
|
||||
beast::websocket::opcode op;
|
||||
beast::multi_buffer b;
|
||||
ws.read(op, b, ec);
|
||||
ws.read(b, ec);
|
||||
if(ec)
|
||||
{
|
||||
auto const s = ec.message();
|
||||
break;
|
||||
}
|
||||
ws.binary(op == beast::websocket::opcode::binary);
|
||||
ws.binary(ws.got_binary());
|
||||
ws.write(b.data(), ec);
|
||||
if(ec)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user