forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cpp-netlib] Fix usage with boost 1.73 (microsoft#13671)
* [cpp-netlib] Fix usage with boost 1.72 * Add dependency port boost-logic, boost-scope-exit Co-authored-by: Robert Schumacher <[email protected]> Co-authored-by: PhoebeHui <[email protected]>
- Loading branch information
1 parent
84c22a7
commit d0511fb
Showing
3 changed files
with
42 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Source: cpp-netlib | ||
Version: 0.13.0-3 | ||
Version: 0.13.0 | ||
Port-Version: 4 | ||
Homepage: https://cpp-netlib.org/ | ||
Build-Depends: boost | ||
Build-Depends: boost-spirit, boost-smart-ptr, boost-asio, boost-program-options, boost-assign, boost-logic, boost-scope-exit | ||
Description: A collection of network-related routines/implementations geared towards providing a robust cross-platform networking library | ||
Supports: !uwp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
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; | ||
} | ||
} |