make_printable replaces buffers rename (API Change):

* The function buffers is deprecated, use the new
  function make_printable as the replacement.

Actions Required:

* Replace call sites to use make_printable instead of buffers,
  and also include make_printable.hpp instead of ostream.hpp.
This commit is contained in:
Vinnie Falco committed 2018-12-19 20:59:20 -08:00
1 parent 991bae8486
commit 0006ab3b2b
16 files changed
+230 -92

No files matched your search

@@ -193,8 +193,8 @@ public:
// If we get here then the connection is closed gracefully
// The buffers() function helps print a ConstBufferSequence
std::cout << beast::buffers(buffer_.data()) << std::endl;
// The make_printable() function helps print a ConstBufferSequence
std::cout << beast::make_printable(buffer_.data()) << std::endl;
}
};
@@ -173,8 +173,8 @@ public:
// If we get here then the connection is closed gracefully
// The buffers() function helps print a ConstBufferSequence
std::cout << beast::buffers(buffer_.data()) << std::endl;
// The make_printable() function helps print a ConstBufferSequence
std::cout << beast::make_printable(buffer_.data()) << std::endl;
}
};
@@ -85,10 +85,10 @@ do_session(
return fail(ec, "write");
// This buffer will hold the incoming message
beast::multi_buffer b;
beast::multi_buffer buffer;
// Read a message into our buffer
ws.async_read(b, yield[ec]);
ws.async_read(buffer, yield[ec]);
if(ec)
return fail(ec, "read");
@@ -99,8 +99,8 @@ do_session(
// If we get here then the connection is closed gracefully
// The buffers() function helps print a ConstBufferSequence
std::cout << beast::buffers(b.data()) << std::endl;
// The make_printable() function helps print a ConstBufferSequence
std::cout << beast::make_printable(buffer.data()) << std::endl;
}
//------------------------------------------------------------------------------
@@ -74,10 +74,10 @@ do_session(
return fail(ec, "write");
// This buffer will hold the incoming message
beast::multi_buffer b;
beast::multi_buffer buffer;
// Read a message into our buffer
ws.async_read(b, yield[ec]);
ws.async_read(buffer, yield[ec]);
if(ec)
return fail(ec, "read");
@@ -88,8 +88,8 @@ do_session(
// If we get here then the connection is closed gracefully
// The buffers() function helps print a ConstBufferSequence
std::cout << beast::buffers(b.data()) << std::endl;
// The make_printable() function helps print a ConstBufferSequence
std::cout << beast::make_printable(buffer.data()) << std::endl;
}
//------------------------------------------------------------------------------
@@ -79,18 +79,18 @@ int main(int argc, char** argv)
ws.write(net::buffer(std::string(text)));
// This buffer will hold the incoming message
beast::multi_buffer b;
beast::multi_buffer buffer;
// Read a message into our buffer
ws.read(b);
ws.read(buffer);
// Close the WebSocket connection
ws.close(websocket::close_code::normal);
// If we get here then the connection is closed gracefully
// The buffers() function helps print a ConstBufferSequence
std::cout << beast::buffers(b.data()) << std::endl;
// The make_printable() function helps print a ConstBufferSequence
std::cout << beast::make_printable(buffer.data()) << std::endl;
}
catch(std::exception const& e)
{
@@ -77,8 +77,8 @@ int main(int argc, char** argv)
// If we get here then the connection is closed gracefully
// The buffers() function helps print a ConstBufferSequence
std::cout << beast::buffers(buffer.data()) << std::endl;
// The make_printable() function helps print a ConstBufferSequence
std::cout << beast::make_printable(buffer.data()) << std::endl;
}
catch(std::exception const& e)
{