mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 21:07:26 +02:00
@ -2,6 +2,7 @@ Version 225:
|
|||||||
|
|
||||||
* Tidy up an unused function
|
* Tidy up an unused function
|
||||||
* Fix wsload jamfile
|
* Fix wsload jamfile
|
||||||
|
* Examples use flat_buffer
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class session : public std::enable_shared_from_this<session>
|
|||||||
tcp::resolver resolver_;
|
tcp::resolver resolver_;
|
||||||
websocket::stream<
|
websocket::stream<
|
||||||
beast::ssl_stream<beast::tcp_stream>> ws_;
|
beast::ssl_stream<beast::tcp_stream>> ws_;
|
||||||
beast::multi_buffer buffer_;
|
beast::flat_buffer buffer_;
|
||||||
std::string host_;
|
std::string host_;
|
||||||
std::string text_;
|
std::string text_;
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class session : public std::enable_shared_from_this<session>
|
|||||||
{
|
{
|
||||||
tcp::resolver resolver_;
|
tcp::resolver resolver_;
|
||||||
websocket::stream<beast::tcp_stream> ws_;
|
websocket::stream<beast::tcp_stream> ws_;
|
||||||
beast::multi_buffer buffer_;
|
beast::flat_buffer buffer_;
|
||||||
std::string host_;
|
std::string host_;
|
||||||
std::string text_;
|
std::string text_;
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ do_session(
|
|||||||
return fail(ec, "write");
|
return fail(ec, "write");
|
||||||
|
|
||||||
// This buffer will hold the incoming message
|
// This buffer will hold the incoming message
|
||||||
beast::multi_buffer buffer;
|
beast::flat_buffer buffer;
|
||||||
|
|
||||||
// Read a message into our buffer
|
// Read a message into our buffer
|
||||||
ws.async_read(buffer, yield[ec]);
|
ws.async_read(buffer, yield[ec]);
|
||||||
|
@ -93,7 +93,7 @@ do_session(
|
|||||||
return fail(ec, "write");
|
return fail(ec, "write");
|
||||||
|
|
||||||
// This buffer will hold the incoming message
|
// This buffer will hold the incoming message
|
||||||
beast::multi_buffer buffer;
|
beast::flat_buffer buffer;
|
||||||
|
|
||||||
// Read a message into our buffer
|
// Read a message into our buffer
|
||||||
ws.async_read(buffer, yield[ec]);
|
ws.async_read(buffer, yield[ec]);
|
||||||
|
@ -89,7 +89,7 @@ int main(int argc, char** argv)
|
|||||||
ws.write(net::buffer(std::string(text)));
|
ws.write(net::buffer(std::string(text)));
|
||||||
|
|
||||||
// This buffer will hold the incoming message
|
// This buffer will hold the incoming message
|
||||||
beast::multi_buffer buffer;
|
beast::flat_buffer buffer;
|
||||||
|
|
||||||
// Read a message into our buffer
|
// Read a message into our buffer
|
||||||
ws.read(buffer);
|
ws.read(buffer);
|
||||||
|
@ -76,7 +76,7 @@ int main(int argc, char** argv)
|
|||||||
ws.write(net::buffer(std::string(text)));
|
ws.write(net::buffer(std::string(text)));
|
||||||
|
|
||||||
// This buffer will hold the incoming message
|
// This buffer will hold the incoming message
|
||||||
beast::multi_buffer buffer;
|
beast::flat_buffer buffer;
|
||||||
|
|
||||||
// Read a message into our buffer
|
// Read a message into our buffer
|
||||||
ws.read(buffer);
|
ws.read(buffer);
|
||||||
|
@ -50,7 +50,7 @@ class session : public std::enable_shared_from_this<session>
|
|||||||
{
|
{
|
||||||
websocket::stream<
|
websocket::stream<
|
||||||
beast::ssl_stream<beast::tcp_stream>> ws_;
|
beast::ssl_stream<beast::tcp_stream>> ws_;
|
||||||
beast::multi_buffer buffer_;
|
beast::flat_buffer buffer_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Take ownership of the socket
|
// 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>
|
class session : public std::enable_shared_from_this<session>
|
||||||
{
|
{
|
||||||
websocket::stream<beast::tcp_stream> ws_;
|
websocket::stream<beast::tcp_stream> ws_;
|
||||||
beast::multi_buffer buffer_;
|
beast::flat_buffer buffer_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Take ownership of the socket
|
// Take ownership of the socket
|
||||||
|
@ -88,7 +88,7 @@ do_session(
|
|||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
// This buffer will hold the incoming message
|
// This buffer will hold the incoming message
|
||||||
beast::multi_buffer buffer;
|
beast::flat_buffer buffer;
|
||||||
|
|
||||||
// Read a message
|
// Read a message
|
||||||
ws.async_read(buffer, yield[ec]);
|
ws.async_read(buffer, yield[ec]);
|
||||||
|
@ -70,7 +70,7 @@ do_session(
|
|||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
// This buffer will hold the incoming message
|
// This buffer will hold the incoming message
|
||||||
beast::multi_buffer buffer;
|
beast::flat_buffer buffer;
|
||||||
|
|
||||||
// Read a message
|
// Read a message
|
||||||
ws.async_read(buffer, yield[ec]);
|
ws.async_read(buffer, yield[ec]);
|
||||||
|
@ -99,7 +99,7 @@ do_sync_session(websocket::stream<beast::tcp_stream>& ws)
|
|||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
beast::multi_buffer buffer;
|
beast::flat_buffer buffer;
|
||||||
|
|
||||||
ws.read(buffer, ec);
|
ws.read(buffer, ec);
|
||||||
if(ec == websocket::error::closed)
|
if(ec == websocket::error::closed)
|
||||||
@ -141,7 +141,7 @@ do_sync_listen(
|
|||||||
class async_session : public std::enable_shared_from_this<async_session>
|
class async_session : public std::enable_shared_from_this<async_session>
|
||||||
{
|
{
|
||||||
websocket::stream<beast::tcp_stream> ws_;
|
websocket::stream<beast::tcp_stream> ws_;
|
||||||
beast::multi_buffer buffer_;
|
beast::flat_buffer buffer_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Take ownership of the socket
|
// Take ownership of the socket
|
||||||
@ -355,7 +355,7 @@ do_coro_session(
|
|||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
beast::multi_buffer buffer;
|
beast::flat_buffer buffer;
|
||||||
|
|
||||||
ws.async_read(buffer, yield[ec]);
|
ws.async_read(buffer, yield[ec]);
|
||||||
if(ec == websocket::error::closed)
|
if(ec == websocket::error::closed)
|
||||||
|
@ -52,7 +52,7 @@ class session
|
|||||||
, public std::enable_shared_from_this<session>
|
, public std::enable_shared_from_this<session>
|
||||||
{
|
{
|
||||||
websocket::stream<beast::ssl_stream<beast::tcp_stream>> ws_;
|
websocket::stream<beast::ssl_stream<beast::tcp_stream>> ws_;
|
||||||
beast::multi_buffer buffer_;
|
beast::flat_buffer buffer_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Take ownership of the socket
|
// Take ownership of the socket
|
||||||
|
@ -47,7 +47,7 @@ class session
|
|||||||
, public std::enable_shared_from_this<session>
|
, public std::enable_shared_from_this<session>
|
||||||
{
|
{
|
||||||
websocket::stream<beast::tcp_stream> ws_;
|
websocket::stream<beast::tcp_stream> ws_;
|
||||||
beast::multi_buffer buffer_;
|
beast::flat_buffer buffer_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Take ownership of the socket
|
// Take ownership of the socket
|
||||||
|
@ -63,7 +63,7 @@ do_session(tcp::socket& socket, ssl::context& ctx)
|
|||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
// This buffer will hold the incoming message
|
// This buffer will hold the incoming message
|
||||||
beast::multi_buffer buffer;
|
beast::flat_buffer buffer;
|
||||||
|
|
||||||
// Read a message
|
// Read a message
|
||||||
ws.read(buffer);
|
ws.read(buffer);
|
||||||
|
@ -54,7 +54,7 @@ do_session(tcp::socket& socket)
|
|||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
// This buffer will hold the incoming message
|
// This buffer will hold the incoming message
|
||||||
beast::multi_buffer buffer;
|
beast::flat_buffer buffer;
|
||||||
|
|
||||||
// Read a message
|
// Read a message
|
||||||
ws.read(buffer);
|
ws.read(buffer);
|
||||||
|
@ -115,7 +115,7 @@ class connection
|
|||||||
test_buffer const& tb_;
|
test_buffer const& tb_;
|
||||||
net::strand<
|
net::strand<
|
||||||
net::io_context::executor_type> strand_;
|
net::io_context::executor_type> strand_;
|
||||||
beast::multi_buffer buffer_;
|
beast::flat_buffer buffer_;
|
||||||
std::mt19937_64 rng_;
|
std::mt19937_64 rng_;
|
||||||
std::size_t count_ = 0;
|
std::size_t count_ = 0;
|
||||||
std::size_t bytes_ = 0;
|
std::size_t bytes_ = 0;
|
||||||
|
Reference in New Issue
Block a user