forked from boostorg/beast
Rename to multi_buffer, basic_multi_buffer (API Change):
These classes are renamed: * streambuf to multi_buffer * basic_streambuf to basic_multi_buffer
This commit is contained in:
@@ -129,16 +129,16 @@ public:
|
||||
ws.write(boost::asio::buffer("Hello, world!", 13));
|
||||
|
||||
// Receive Secure WebSocket message, print and close using Beast
|
||||
beast::streambuf sb;
|
||||
beast::multi_buffer b;
|
||||
beast::websocket::opcode op;
|
||||
ws.read(op, sb);
|
||||
ws.read(op, b);
|
||||
ws.close(beast::websocket::close_code::normal);
|
||||
try
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
ws.read(op, sb);
|
||||
sb.consume(sb.size());
|
||||
ws.read(op, b);
|
||||
b.consume(b.size());
|
||||
}
|
||||
}
|
||||
catch(system_error const& se)
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
throw;
|
||||
}
|
||||
BEAST_EXPECT(boost::lexical_cast<std::string>(
|
||||
buffers(sb.data())) == "Hello, world!");
|
||||
buffers(b.data())) == "Hello, world!");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user