mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-21 19:27:56 +08:00
d0511fbd55
* [cpp-netlib] Fix usage with boost 1.72 * Add dependency port boost-logic, boost-scope-exit Co-authored-by: Robert Schumacher <roschuma@microsoft.com> Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
28 lines
1.1 KiB
Diff
28 lines
1.1 KiB
Diff
diff --git a/boost/network/protocol/stream_handler.hpp b/boost/network/protocol/stream_handler.hpp
|
|
index ffb09b8..f3b3e99 100644
|
|
--- a/boost/network/protocol/stream_handler.hpp
|
|
+++ b/boost/network/protocol/stream_handler.hpp
|
|
@@ -41,6 +40,7 @@ typedef boost::asio::ssl::context ssl_context;
|
|
|
|
struct stream_handler {
|
|
public:
|
|
+ typedef tcp_socket::executor_type executor_type;
|
|
stream_handler(std::shared_ptr<tcp_socket> socket)
|
|
: tcp_sock_(std::move(socket)), ssl_enabled(false) {}
|
|
|
|
@@ -52,12 +52,12 @@ struct stream_handler {
|
|
stream_handler(boost::asio::io_service& io,
|
|
std::shared_ptr<ssl_context> ctx =
|
|
std::shared_ptr<ssl_context>()) {
|
|
- tcp_sock_ = std::make_shared<tcp_socket>(boost::ref(io));
|
|
+ tcp_sock_ = std::make_shared<tcp_socket>(io.get_executor());
|
|
ssl_enabled = false;
|
|
if (ctx) {
|
|
/// SSL is enabled
|
|
ssl_sock_ =
|
|
- std::make_shared<ssl_socket>(boost::ref(io), boost::ref(*ctx));
|
|
+ std::make_shared<ssl_socket>(io.get_executor(), boost::ref(*ctx));
|
|
ssl_enabled = true;
|
|
}
|
|
}
|