binary, text are members of stream (API Change):

fix #446

* message_type is removed

Actions Required:

* Change call sites which use message_type with set_option
  to call stream::binary or stream::text instead.
This commit is contained in:
Vinnie Falco
2017-07-20 08:12:19 -07:00
parent f22895224b
commit e6c0d698ee
11 changed files with 157 additions and 192 deletions
+2 -2
View File
@@ -154,7 +154,7 @@ boost::asio::ip::tcp::socket sock{ios};
opcode op;
ws.read(op, buffer);
ws.set_option(message_type{op});
ws.binary(op == opcode::binary);
ws.write(buffer.data());
buffer.consume(buffer.size());
//]
@@ -171,7 +171,7 @@ boost::asio::ip::tcp::socket sock{ios};
if(fi.fin)
break;
}
ws.set_option(message_type{fi.op});
ws.binary(fi.op == opcode::binary);
consuming_buffers<multi_buffer::const_buffers_type> cb{buffer.data()};
for(;;)
{