mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 12:57:31 +02:00
Pass strand to async_accept
This commit is contained in:
@ -2,6 +2,7 @@ Version 217:
|
|||||||
|
|
||||||
* websocket idle pings
|
* websocket idle pings
|
||||||
* RatePolicy documentation
|
* RatePolicy documentation
|
||||||
|
* Pass strand to async_accept
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -861,7 +861,6 @@ class listener : public std::enable_shared_from_this<listener>
|
|||||||
net::io_context& ioc_;
|
net::io_context& ioc_;
|
||||||
ssl::context& ctx_;
|
ssl::context& ctx_;
|
||||||
tcp::acceptor acceptor_;
|
tcp::acceptor acceptor_;
|
||||||
tcp::socket socket_;
|
|
||||||
std::shared_ptr<std::string const> doc_root_;
|
std::shared_ptr<std::string const> doc_root_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -873,7 +872,6 @@ public:
|
|||||||
: ioc_(ioc)
|
: ioc_(ioc)
|
||||||
, ctx_(ctx)
|
, ctx_(ctx)
|
||||||
, acceptor_(beast::make_strand(ioc))
|
, acceptor_(beast::make_strand(ioc))
|
||||||
, socket_(beast::make_strand(ioc))
|
|
||||||
, doc_root_(doc_root)
|
, doc_root_(doc_root)
|
||||||
{
|
{
|
||||||
beast::error_code ec;
|
beast::error_code ec;
|
||||||
@ -924,15 +922,16 @@ public:
|
|||||||
void
|
void
|
||||||
do_accept()
|
do_accept()
|
||||||
{
|
{
|
||||||
|
// The new connection gets its own strand
|
||||||
acceptor_.async_accept(
|
acceptor_.async_accept(
|
||||||
socket_,
|
beast::make_strand(ioc_),
|
||||||
beast::bind_front_handler(
|
beast::bind_front_handler(
|
||||||
&listener::on_accept,
|
&listener::on_accept,
|
||||||
shared_from_this()));
|
shared_from_this()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
on_accept(beast::error_code ec)
|
on_accept(beast::error_code ec, tcp::socket socket)
|
||||||
{
|
{
|
||||||
if(ec)
|
if(ec)
|
||||||
{
|
{
|
||||||
@ -942,14 +941,11 @@ public:
|
|||||||
{
|
{
|
||||||
// Create the detector http_session and run it
|
// Create the detector http_session and run it
|
||||||
std::make_shared<detect_session>(
|
std::make_shared<detect_session>(
|
||||||
std::move(socket_),
|
std::move(socket),
|
||||||
ctx_,
|
ctx_,
|
||||||
doc_root_)->run();
|
doc_root_)->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure each session gets its own strand
|
|
||||||
socket_ = tcp::socket(beast::make_strand(ioc_));
|
|
||||||
|
|
||||||
// Accept another connection
|
// Accept another connection
|
||||||
do_accept();
|
do_accept();
|
||||||
}
|
}
|
||||||
|
@ -526,7 +526,6 @@ class listener : public std::enable_shared_from_this<listener>
|
|||||||
{
|
{
|
||||||
net::io_context& ioc_;
|
net::io_context& ioc_;
|
||||||
tcp::acceptor acceptor_;
|
tcp::acceptor acceptor_;
|
||||||
tcp::socket socket_;
|
|
||||||
std::shared_ptr<std::string const> doc_root_;
|
std::shared_ptr<std::string const> doc_root_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -536,7 +535,6 @@ public:
|
|||||||
std::shared_ptr<std::string const> const& doc_root)
|
std::shared_ptr<std::string const> const& doc_root)
|
||||||
: ioc_(ioc)
|
: ioc_(ioc)
|
||||||
, acceptor_(beast::make_strand(ioc))
|
, acceptor_(beast::make_strand(ioc))
|
||||||
, socket_(beast::make_strand(ioc))
|
|
||||||
, doc_root_(doc_root)
|
, doc_root_(doc_root)
|
||||||
{
|
{
|
||||||
beast::error_code ec;
|
beast::error_code ec;
|
||||||
@ -587,15 +585,16 @@ public:
|
|||||||
void
|
void
|
||||||
do_accept()
|
do_accept()
|
||||||
{
|
{
|
||||||
|
// The new connection gets its own strand
|
||||||
acceptor_.async_accept(
|
acceptor_.async_accept(
|
||||||
socket_,
|
beast::make_strand(ioc_),
|
||||||
beast::bind_front_handler(
|
beast::bind_front_handler(
|
||||||
&listener::on_accept,
|
&listener::on_accept,
|
||||||
shared_from_this()));
|
shared_from_this()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
on_accept(beast::error_code ec)
|
on_accept(beast::error_code ec, tcp::socket socket)
|
||||||
{
|
{
|
||||||
if(ec)
|
if(ec)
|
||||||
{
|
{
|
||||||
@ -605,13 +604,10 @@ public:
|
|||||||
{
|
{
|
||||||
// Create the http session and run it
|
// Create the http session and run it
|
||||||
std::make_shared<http_session>(
|
std::make_shared<http_session>(
|
||||||
std::move(socket_),
|
std::move(socket),
|
||||||
doc_root_)->run();
|
doc_root_)->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure each session gets its own strand
|
|
||||||
socket_ = tcp::socket(beast::make_strand(ioc_));
|
|
||||||
|
|
||||||
// Accept another connection
|
// Accept another connection
|
||||||
do_accept();
|
do_accept();
|
||||||
}
|
}
|
||||||
|
@ -390,7 +390,6 @@ class listener : public std::enable_shared_from_this<listener>
|
|||||||
net::io_context& ioc_;
|
net::io_context& ioc_;
|
||||||
ssl::context& ctx_;
|
ssl::context& ctx_;
|
||||||
tcp::acceptor acceptor_;
|
tcp::acceptor acceptor_;
|
||||||
tcp::socket socket_;
|
|
||||||
std::shared_ptr<std::string const> doc_root_;
|
std::shared_ptr<std::string const> doc_root_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -402,7 +401,6 @@ public:
|
|||||||
: ioc_(ioc)
|
: ioc_(ioc)
|
||||||
, ctx_(ctx)
|
, ctx_(ctx)
|
||||||
, acceptor_(ioc)
|
, acceptor_(ioc)
|
||||||
, socket_(beast::make_strand(ioc))
|
|
||||||
, doc_root_(doc_root)
|
, doc_root_(doc_root)
|
||||||
{
|
{
|
||||||
beast::error_code ec;
|
beast::error_code ec;
|
||||||
@ -453,15 +451,16 @@ public:
|
|||||||
void
|
void
|
||||||
do_accept()
|
do_accept()
|
||||||
{
|
{
|
||||||
|
// The new connection gets its own strand
|
||||||
acceptor_.async_accept(
|
acceptor_.async_accept(
|
||||||
socket_,
|
beast::make_strand(ioc_),
|
||||||
beast::bind_front_handler(
|
beast::bind_front_handler(
|
||||||
&listener::on_accept,
|
&listener::on_accept,
|
||||||
shared_from_this()));
|
shared_from_this()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
on_accept(beast::error_code ec)
|
on_accept(beast::error_code ec, tcp::socket socket)
|
||||||
{
|
{
|
||||||
if(ec)
|
if(ec)
|
||||||
{
|
{
|
||||||
@ -471,14 +470,11 @@ public:
|
|||||||
{
|
{
|
||||||
// Create the session and run it
|
// Create the session and run it
|
||||||
std::make_shared<session>(
|
std::make_shared<session>(
|
||||||
std::move(socket_),
|
std::move(socket),
|
||||||
ctx_,
|
ctx_,
|
||||||
doc_root_)->run();
|
doc_root_)->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure each session gets its own strand
|
|
||||||
socket_ = tcp::socket(beast::make_strand(ioc_));
|
|
||||||
|
|
||||||
// Accept another connection
|
// Accept another connection
|
||||||
do_accept();
|
do_accept();
|
||||||
}
|
}
|
||||||
|
@ -354,7 +354,6 @@ class listener : public std::enable_shared_from_this<listener>
|
|||||||
{
|
{
|
||||||
net::io_context& ioc_;
|
net::io_context& ioc_;
|
||||||
tcp::acceptor acceptor_;
|
tcp::acceptor acceptor_;
|
||||||
tcp::socket socket_;
|
|
||||||
std::shared_ptr<std::string const> doc_root_;
|
std::shared_ptr<std::string const> doc_root_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -364,7 +363,6 @@ public:
|
|||||||
std::shared_ptr<std::string const> const& doc_root)
|
std::shared_ptr<std::string const> const& doc_root)
|
||||||
: ioc_(ioc)
|
: ioc_(ioc)
|
||||||
, acceptor_(beast::make_strand(ioc))
|
, acceptor_(beast::make_strand(ioc))
|
||||||
, socket_(beast::make_strand(ioc))
|
|
||||||
, doc_root_(doc_root)
|
, doc_root_(doc_root)
|
||||||
{
|
{
|
||||||
beast::error_code ec;
|
beast::error_code ec;
|
||||||
@ -415,15 +413,16 @@ public:
|
|||||||
void
|
void
|
||||||
do_accept()
|
do_accept()
|
||||||
{
|
{
|
||||||
|
// The new connection gets its own strand
|
||||||
acceptor_.async_accept(
|
acceptor_.async_accept(
|
||||||
socket_,
|
beast::make_strand(ioc_),
|
||||||
beast::bind_front_handler(
|
beast::bind_front_handler(
|
||||||
&listener::on_accept,
|
&listener::on_accept,
|
||||||
shared_from_this()));
|
shared_from_this()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
on_accept(beast::error_code ec)
|
on_accept(beast::error_code ec, tcp::socket socket)
|
||||||
{
|
{
|
||||||
if(ec)
|
if(ec)
|
||||||
{
|
{
|
||||||
@ -433,13 +432,10 @@ public:
|
|||||||
{
|
{
|
||||||
// Create the session and run it
|
// Create the session and run it
|
||||||
std::make_shared<session>(
|
std::make_shared<session>(
|
||||||
std::move(socket_),
|
std::move(socket),
|
||||||
doc_root_)->run();
|
doc_root_)->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure each session gets its own strand
|
|
||||||
socket_ = tcp::socket(beast::make_strand(ioc_));
|
|
||||||
|
|
||||||
// Accept another connection
|
// Accept another connection
|
||||||
do_accept();
|
do_accept();
|
||||||
}
|
}
|
||||||
|
@ -541,7 +541,6 @@ class listener : public std::enable_shared_from_this<listener>
|
|||||||
net::io_context& ioc_;
|
net::io_context& ioc_;
|
||||||
ssl::context& ctx_;
|
ssl::context& ctx_;
|
||||||
tcp::acceptor acceptor_;
|
tcp::acceptor acceptor_;
|
||||||
tcp::socket socket_;
|
|
||||||
std::shared_ptr<std::string const> doc_root_;
|
std::shared_ptr<std::string const> doc_root_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -553,7 +552,6 @@ public:
|
|||||||
: ioc_(ioc)
|
: ioc_(ioc)
|
||||||
, ctx_(ctx)
|
, ctx_(ctx)
|
||||||
, acceptor_(beast::make_strand(ioc))
|
, acceptor_(beast::make_strand(ioc))
|
||||||
, socket_(beast::make_strand(ioc))
|
|
||||||
, doc_root_(doc_root)
|
, doc_root_(doc_root)
|
||||||
{
|
{
|
||||||
beast::error_code ec;
|
beast::error_code ec;
|
||||||
@ -604,15 +602,16 @@ public:
|
|||||||
void
|
void
|
||||||
do_accept()
|
do_accept()
|
||||||
{
|
{
|
||||||
|
// The new connection gets its own strand
|
||||||
acceptor_.async_accept(
|
acceptor_.async_accept(
|
||||||
socket_,
|
beast::make_strand(ioc_),
|
||||||
beast::bind_front_handler(
|
beast::bind_front_handler(
|
||||||
&listener::on_accept,
|
&listener::on_accept,
|
||||||
shared_from_this()));
|
shared_from_this()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
on_accept(beast::error_code ec)
|
on_accept(beast::error_code ec, tcp::socket socket)
|
||||||
{
|
{
|
||||||
if(ec)
|
if(ec)
|
||||||
{
|
{
|
||||||
@ -622,14 +621,11 @@ public:
|
|||||||
{
|
{
|
||||||
// Create the detector session and run it
|
// Create the detector session and run it
|
||||||
std::make_shared<detect_session>(
|
std::make_shared<detect_session>(
|
||||||
std::move(socket_),
|
std::move(socket),
|
||||||
ctx_,
|
ctx_,
|
||||||
doc_root_)->run();
|
doc_root_)->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure each session gets its own strand
|
|
||||||
socket_ = tcp::socket(beast::make_strand(ioc_));
|
|
||||||
|
|
||||||
// Accept another connection
|
// Accept another connection
|
||||||
do_accept();
|
do_accept();
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,6 @@ class listener : public std::enable_shared_from_this<listener>
|
|||||||
net::io_context& ioc_;
|
net::io_context& ioc_;
|
||||||
ssl::context& ctx_;
|
ssl::context& ctx_;
|
||||||
tcp::acceptor acceptor_;
|
tcp::acceptor acceptor_;
|
||||||
tcp::socket socket_;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
listener(
|
listener(
|
||||||
@ -185,7 +184,6 @@ public:
|
|||||||
: ioc_(ioc)
|
: ioc_(ioc)
|
||||||
, ctx_(ctx)
|
, ctx_(ctx)
|
||||||
, acceptor_(beast::make_strand(ioc))
|
, acceptor_(beast::make_strand(ioc))
|
||||||
, socket_(beast::make_strand(ioc))
|
|
||||||
{
|
{
|
||||||
beast::error_code ec;
|
beast::error_code ec;
|
||||||
|
|
||||||
@ -235,15 +233,16 @@ public:
|
|||||||
void
|
void
|
||||||
do_accept()
|
do_accept()
|
||||||
{
|
{
|
||||||
|
// The new connection gets its own strand
|
||||||
acceptor_.async_accept(
|
acceptor_.async_accept(
|
||||||
socket_,
|
beast::make_strand(ioc_),
|
||||||
beast::bind_front_handler(
|
beast::bind_front_handler(
|
||||||
&listener::on_accept,
|
&listener::on_accept,
|
||||||
shared_from_this()));
|
shared_from_this()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
on_accept(beast::error_code ec)
|
on_accept(beast::error_code ec, tcp::socket socket)
|
||||||
{
|
{
|
||||||
if(ec)
|
if(ec)
|
||||||
{
|
{
|
||||||
@ -252,12 +251,9 @@ public:
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Create the session and run it
|
// Create the session and run it
|
||||||
std::make_shared<session>(std::move(socket_), ctx_)->run();
|
std::make_shared<session>(std::move(socket), ctx_)->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure each session gets its own strand
|
|
||||||
socket_ = tcp::socket(beast::make_strand(ioc_));
|
|
||||||
|
|
||||||
// Accept another connection
|
// Accept another connection
|
||||||
do_accept();
|
do_accept();
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,6 @@ class listener : public std::enable_shared_from_this<listener>
|
|||||||
{
|
{
|
||||||
net::io_context& ioc_;
|
net::io_context& ioc_;
|
||||||
tcp::acceptor acceptor_;
|
tcp::acceptor acceptor_;
|
||||||
tcp::socket socket_;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
listener(
|
listener(
|
||||||
@ -156,7 +155,6 @@ public:
|
|||||||
tcp::endpoint endpoint)
|
tcp::endpoint endpoint)
|
||||||
: ioc_(ioc)
|
: ioc_(ioc)
|
||||||
, acceptor_(ioc)
|
, acceptor_(ioc)
|
||||||
, socket_(beast::make_strand(ioc_))
|
|
||||||
{
|
{
|
||||||
beast::error_code ec;
|
beast::error_code ec;
|
||||||
|
|
||||||
@ -206,15 +204,16 @@ public:
|
|||||||
void
|
void
|
||||||
do_accept()
|
do_accept()
|
||||||
{
|
{
|
||||||
|
// The new connection gets its own strand
|
||||||
acceptor_.async_accept(
|
acceptor_.async_accept(
|
||||||
socket_,
|
beast::make_strand(ioc_),
|
||||||
beast::bind_front_handler(
|
beast::bind_front_handler(
|
||||||
&listener::on_accept,
|
&listener::on_accept,
|
||||||
shared_from_this()));
|
shared_from_this()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
on_accept(beast::error_code ec)
|
on_accept(beast::error_code ec, tcp::socket socket)
|
||||||
{
|
{
|
||||||
if(ec)
|
if(ec)
|
||||||
{
|
{
|
||||||
@ -223,12 +222,9 @@ public:
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Create the session and run it
|
// Create the session and run it
|
||||||
std::make_shared<session>(std::move(socket_))->run();
|
std::make_shared<session>(std::move(socket))->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure each session gets its own strand
|
|
||||||
socket_ = tcp::socket(beast::make_strand(ioc_));
|
|
||||||
|
|
||||||
// Accept another connection
|
// Accept another connection
|
||||||
do_accept();
|
do_accept();
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,6 @@ listener(
|
|||||||
boost::shared_ptr<shared_state> const& state)
|
boost::shared_ptr<shared_state> const& state)
|
||||||
: ioc_(ioc)
|
: ioc_(ioc)
|
||||||
, acceptor_(ioc)
|
, acceptor_(ioc)
|
||||||
, socket_(beast::make_strand(ioc))
|
|
||||||
, state_(state)
|
, state_(state)
|
||||||
{
|
{
|
||||||
beast::error_code ec;
|
beast::error_code ec;
|
||||||
@ -61,9 +60,9 @@ void
|
|||||||
listener::
|
listener::
|
||||||
run()
|
run()
|
||||||
{
|
{
|
||||||
// Start accepting a connection
|
// The new connection gets its own strand
|
||||||
acceptor_.async_accept(
|
acceptor_.async_accept(
|
||||||
socket_,
|
beast::make_strand(ioc_),
|
||||||
beast::bind_front_handler(
|
beast::bind_front_handler(
|
||||||
&listener::on_accept,
|
&listener::on_accept,
|
||||||
shared_from_this()));
|
shared_from_this()));
|
||||||
@ -83,22 +82,19 @@ fail(beast::error_code ec, char const* what)
|
|||||||
// Handle a connection
|
// Handle a connection
|
||||||
void
|
void
|
||||||
listener::
|
listener::
|
||||||
on_accept(beast::error_code ec)
|
on_accept(beast::error_code ec, tcp::socket socket)
|
||||||
{
|
{
|
||||||
if(ec)
|
if(ec)
|
||||||
return fail(ec, "accept");
|
return fail(ec, "accept");
|
||||||
else
|
else
|
||||||
// Launch a new session for this connection
|
// Launch a new session for this connection
|
||||||
boost::make_shared<http_session>(
|
boost::make_shared<http_session>(
|
||||||
std::move(socket_),
|
std::move(socket),
|
||||||
state_)->run();
|
state_)->run();
|
||||||
|
|
||||||
// Make sure each session gets its own strand
|
// The new connection gets its own strand
|
||||||
socket_ = tcp::socket(beast::make_strand(ioc_));
|
|
||||||
|
|
||||||
// Accept another connection
|
|
||||||
acceptor_.async_accept(
|
acceptor_.async_accept(
|
||||||
socket_,
|
beast::make_strand(ioc_),
|
||||||
beast::bind_front_handler(
|
beast::bind_front_handler(
|
||||||
&listener::on_accept,
|
&listener::on_accept,
|
||||||
shared_from_this()));
|
shared_from_this()));
|
||||||
|
@ -24,11 +24,10 @@ class listener : public boost::enable_shared_from_this<listener>
|
|||||||
{
|
{
|
||||||
net::io_context& ioc_;
|
net::io_context& ioc_;
|
||||||
tcp::acceptor acceptor_;
|
tcp::acceptor acceptor_;
|
||||||
tcp::socket socket_;
|
|
||||||
boost::shared_ptr<shared_state> state_;
|
boost::shared_ptr<shared_state> state_;
|
||||||
|
|
||||||
void fail(beast::error_code ec, char const* what);
|
void fail(beast::error_code ec, char const* what);
|
||||||
void on_accept(beast::error_code ec);
|
void on_accept(beast::error_code ec, tcp::socket socket);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
listener(
|
listener(
|
||||||
|
@ -243,7 +243,6 @@ class async_listener : public std::enable_shared_from_this<async_listener>
|
|||||||
{
|
{
|
||||||
net::io_context& ioc_;
|
net::io_context& ioc_;
|
||||||
tcp::acceptor acceptor_;
|
tcp::acceptor acceptor_;
|
||||||
tcp::socket socket_;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
async_listener(
|
async_listener(
|
||||||
@ -251,7 +250,6 @@ public:
|
|||||||
tcp::endpoint endpoint)
|
tcp::endpoint endpoint)
|
||||||
: ioc_(ioc)
|
: ioc_(ioc)
|
||||||
, acceptor_(beast::make_strand(ioc))
|
, acceptor_(beast::make_strand(ioc))
|
||||||
, socket_(beast::make_strand(ioc))
|
|
||||||
{
|
{
|
||||||
beast::error_code ec;
|
beast::error_code ec;
|
||||||
|
|
||||||
@ -301,15 +299,16 @@ public:
|
|||||||
void
|
void
|
||||||
do_accept()
|
do_accept()
|
||||||
{
|
{
|
||||||
|
// The new connection gets its own strand
|
||||||
acceptor_.async_accept(
|
acceptor_.async_accept(
|
||||||
socket_,
|
beast::make_strand(ioc_),
|
||||||
beast::bind_front_handler(
|
beast::bind_front_handler(
|
||||||
&async_listener::on_accept,
|
&async_listener::on_accept,
|
||||||
shared_from_this()));
|
shared_from_this()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
on_accept(beast::error_code ec)
|
on_accept(beast::error_code ec, tcp::socket socket)
|
||||||
{
|
{
|
||||||
if(ec)
|
if(ec)
|
||||||
{
|
{
|
||||||
@ -318,12 +317,9 @@ public:
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Create the async_session and run it
|
// Create the async_session and run it
|
||||||
std::make_shared<async_session>(std::move(socket_))->run();
|
std::make_shared<async_session>(std::move(socket))->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure each session gets its own strand
|
|
||||||
socket_ = tcp::socket(beast::make_strand(ioc_));
|
|
||||||
|
|
||||||
// Accept another connection
|
// Accept another connection
|
||||||
do_accept();
|
do_accept();
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <boost/beast/core/make_strand.hpp>
|
#include <boost/beast/core/make_strand.hpp>
|
||||||
#include <boost/beast/core/multi_buffer.hpp>
|
#include <boost/beast/core/multi_buffer.hpp>
|
||||||
#include <boost/beast/core/ostream.hpp>
|
#include <boost/beast/core/ostream.hpp>
|
||||||
|
#include <boost/beast/core/rate_policy.hpp>
|
||||||
#include <boost/beast/core/read_size.hpp>
|
#include <boost/beast/core/read_size.hpp>
|
||||||
#include <boost/beast/core/span.hpp>
|
#include <boost/beast/core/span.hpp>
|
||||||
#include <boost/beast/core/static_buffer.hpp>
|
#include <boost/beast/core/static_buffer.hpp>
|
||||||
|
Reference in New Issue
Block a user