forked from boostorg/beast
make_strand is in net::
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <boost/beast/http.hpp>
|
||||
#include <boost/beast/ssl.hpp>
|
||||
#include <boost/beast/version.hpp>
|
||||
#include <boost/asio/strand.hpp>
|
||||
#include <cstdlib>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
@@ -54,8 +55,8 @@ public:
|
||||
// ensure that handlers do not execute concurrently.
|
||||
explicit
|
||||
session(net::io_context& ioc, ssl::context& ctx)
|
||||
: resolver_(beast::make_strand(ioc))
|
||||
, stream_(beast::make_strand(ioc), ctx)
|
||||
: resolver_(net::make_strand(ioc))
|
||||
, stream_(net::make_strand(ioc), ctx)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <boost/beast/core.hpp>
|
||||
#include <boost/beast/http.hpp>
|
||||
#include <boost/beast/version.hpp>
|
||||
#include <boost/asio/strand.hpp>
|
||||
#include <cstdlib>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
@@ -50,8 +51,8 @@ public:
|
||||
// ensure that handlers do not execute concurrently.
|
||||
explicit
|
||||
session(net::io_context& ioc)
|
||||
: resolver_(beast::make_strand(ioc))
|
||||
, stream_(beast::make_strand(ioc))
|
||||
: resolver_(net::make_strand(ioc))
|
||||
, stream_(net::make_strand(ioc))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -164,8 +164,8 @@ public:
|
||||
crawl_report& report,
|
||||
net::io_context& ioc)
|
||||
: report_(report)
|
||||
, resolver_(beast::make_strand(ioc))
|
||||
, stream_(beast::make_strand(ioc))
|
||||
, resolver_(net::make_strand(ioc))
|
||||
, stream_(net::make_strand(ioc))
|
||||
{
|
||||
// Set up the common fields of the request
|
||||
req_.version(11);
|
||||
|
||||
@@ -473,7 +473,7 @@ public:
|
||||
{
|
||||
// The new connection gets its own strand
|
||||
acceptor_.async_accept(
|
||||
beast::make_strand(ioc_),
|
||||
net::make_strand(ioc_),
|
||||
beast::bind_front_handler(
|
||||
&listener::on_accept,
|
||||
shared_from_this()));
|
||||
|
||||
@@ -362,7 +362,7 @@ public:
|
||||
tcp::endpoint endpoint,
|
||||
std::shared_ptr<std::string const> const& doc_root)
|
||||
: ioc_(ioc)
|
||||
, acceptor_(beast::make_strand(ioc))
|
||||
, acceptor_(net::make_strand(ioc))
|
||||
, doc_root_(doc_root)
|
||||
{
|
||||
beast::error_code ec;
|
||||
@@ -415,7 +415,7 @@ public:
|
||||
{
|
||||
// The new connection gets its own strand
|
||||
acceptor_.async_accept(
|
||||
beast::make_strand(ioc_),
|
||||
net::make_strand(ioc_),
|
||||
beast::bind_front_handler(
|
||||
&listener::on_accept,
|
||||
shared_from_this()));
|
||||
|
||||
@@ -570,7 +570,7 @@ public:
|
||||
std::shared_ptr<std::string const> const& doc_root)
|
||||
: ioc_(ioc)
|
||||
, ctx_(ctx)
|
||||
, acceptor_(beast::make_strand(ioc))
|
||||
, acceptor_(net::make_strand(ioc))
|
||||
, doc_root_(doc_root)
|
||||
{
|
||||
beast::error_code ec;
|
||||
@@ -623,7 +623,7 @@ public:
|
||||
{
|
||||
// The new connection gets its own strand
|
||||
acceptor_.async_accept(
|
||||
beast::make_strand(ioc_),
|
||||
net::make_strand(ioc_),
|
||||
beast::bind_front_handler(
|
||||
&listener::on_accept,
|
||||
shared_from_this()));
|
||||
|
||||
@@ -413,8 +413,8 @@ public:
|
||||
std::shared_ptr<std::string const> const& doc_root)
|
||||
: ioc_(ioc)
|
||||
, ctx_(ctx)
|
||||
, acceptor_(beast::make_strand(ioc))
|
||||
, socket_(beast::make_strand(ioc))
|
||||
, acceptor_(net::make_strand(ioc))
|
||||
, socket_(net::make_strand(ioc))
|
||||
, doc_root_(doc_root)
|
||||
{
|
||||
beast::error_code ec;
|
||||
@@ -490,7 +490,7 @@ public:
|
||||
}
|
||||
|
||||
// Make sure each session gets its own strand
|
||||
socket_ = tcp::socket(beast::make_strand(ioc_));
|
||||
socket_ = tcp::socket(net::make_strand(ioc_));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,8 +356,8 @@ public:
|
||||
tcp::endpoint endpoint,
|
||||
std::shared_ptr<std::string const> const& doc_root)
|
||||
: ioc_(ioc)
|
||||
, acceptor_(beast::make_strand(ioc))
|
||||
, socket_(beast::make_strand(ioc))
|
||||
, acceptor_(net::make_strand(ioc))
|
||||
, socket_(net::make_strand(ioc))
|
||||
, doc_root_(doc_root)
|
||||
{
|
||||
beast::error_code ec;
|
||||
@@ -430,7 +430,7 @@ public:
|
||||
}
|
||||
|
||||
// Make sure each session gets its own strand
|
||||
socket_ = tcp::socket(beast::make_strand(ioc_));
|
||||
socket_ = tcp::socket(net::make_strand(ioc_));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user