Examples use flat_buffer

fix #1488
This commit is contained in:
Vinnie Falco committed 2019-03-01 12:02:28 -08:00
1 parent 7806672f42
commit 272b6f23e4
17 files changed
+19 -18

No files matched your search

@@ -50,7 +50,7 @@ class session : public std::enable_shared_from_this<session>
{
websocket::stream<
beast::ssl_stream<beast::tcp_stream>> ws_;
beast::multi_buffer buffer_;
beast::flat_buffer buffer_;
public:
// Take ownership of the socket
@@ -44,7 +44,7 @@ fail(beast::error_code ec, char const* what)
class session : public std::enable_shared_from_this<session>
{
websocket::stream<beast::tcp_stream> ws_;
beast::multi_buffer buffer_;
beast::flat_buffer buffer_;
public:
// Take ownership of the socket
@@ -88,7 +88,7 @@ do_session(
for(;;)
{
// This buffer will hold the incoming message
beast::multi_buffer buffer;
beast::flat_buffer buffer;
// Read a message
ws.async_read(buffer, yield[ec]);
@@ -70,7 +70,7 @@ do_session(
for(;;)
{
// This buffer will hold the incoming message
beast::multi_buffer buffer;
beast::flat_buffer buffer;
// Read a message
ws.async_read(buffer, yield[ec]);
@@ -99,7 +99,7 @@ do_sync_session(websocket::stream<beast::tcp_stream>& ws)
for(;;)
{
beast::multi_buffer buffer;
beast::flat_buffer buffer;
ws.read(buffer, ec);
if(ec == websocket::error::closed)
@@ -141,7 +141,7 @@ do_sync_listen(
class async_session : public std::enable_shared_from_this<async_session>
{
websocket::stream<beast::tcp_stream> ws_;
beast::multi_buffer buffer_;
beast::flat_buffer buffer_;
public:
// Take ownership of the socket
@@ -355,7 +355,7 @@ do_coro_session(
for(;;)
{
beast::multi_buffer buffer;
beast::flat_buffer buffer;
ws.async_read(buffer, yield[ec]);
if(ec == websocket::error::closed)
@@ -52,7 +52,7 @@ class session
, public std::enable_shared_from_this<session>
{
websocket::stream<beast::ssl_stream<beast::tcp_stream>> ws_;
beast::multi_buffer buffer_;
beast::flat_buffer buffer_;
public:
// Take ownership of the socket
@@ -47,7 +47,7 @@ class session
, public std::enable_shared_from_this<session>
{
websocket::stream<beast::tcp_stream> ws_;
beast::multi_buffer buffer_;
beast::flat_buffer buffer_;
public:
// Take ownership of the socket
@@ -63,7 +63,7 @@ do_session(tcp::socket& socket, ssl::context& ctx)
for(;;)
{
// This buffer will hold the incoming message
beast::multi_buffer buffer;
beast::flat_buffer buffer;
// Read a message
ws.read(buffer);
@@ -54,7 +54,7 @@ do_session(tcp::socket& socket)
for(;;)
{
// This buffer will hold the incoming message
beast::multi_buffer buffer;
beast::flat_buffer buffer;
// Read a message
ws.read(buffer);