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:
1 parent
38b473902a
commit
24fd254690
45 files changed
+744
-745
No files matched your search
@@ -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!");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define WEBSOCKET_ASYNC_SSL_ECHO_SERVER_HPP
|
||||
|
||||
#include <beast/core/placeholders.hpp>
|
||||
#include <beast/core/streambuf.hpp>
|
||||
#include <beast/core/multi_buffer.hpp>
|
||||
#include <beast/websocket/ssl.hpp>
|
||||
#include <beast/websocket/stream.hpp>
|
||||
#include <boost/asio/ssl.hpp>
|
||||
@@ -156,7 +156,7 @@ private:
|
||||
boost::asio::ssl::stream<socket_type>> ws;
|
||||
boost::asio::io_service::strand strand;
|
||||
beast::websocket::opcode op;
|
||||
beast::streambuf db;
|
||||
beast::multi_buffer db;
|
||||
std::size_t id;
|
||||
|
||||
data(async_ssl_echo_server& server_,
|
||||
|
||||
Reference in new issue
Block a user