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:
@@ -130,14 +130,13 @@ public:
|
||||
|
||||
// Receive Secure WebSocket message, print and close using Beast
|
||||
beast::multi_buffer b;
|
||||
beast::websocket::opcode op;
|
||||
ws.read(op, b);
|
||||
ws.read(b);
|
||||
ws.close(beast::websocket::close_code::normal);
|
||||
try
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
ws.read(op, b);
|
||||
ws.read(b);
|
||||
b.consume(b.size());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user