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:
Vinnie Falco
2017-06-08 19:55:42 -07:00
parent 3d6574da81
commit 620ce08d6a
13 changed files with 142 additions and 145 deletions

View File

@@ -30,8 +30,7 @@ int main()
// Receive 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);
std::cout << beast::buffers(b.data()) << "\n";
}