From 17a3bb9337fd7e4a57354ed5359e449d5ab1388c Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 6 Sep 2023 18:36:44 +0200 Subject: deps: switch from non-boost to boost asio --- source/lib/control/include/wanda/control/commander.hpp | 7 ++++--- source/lib/control/include/wanda/control/connection.hpp | 12 +++++++----- source/lib/control/include/wanda/control/interface.hpp | 13 +++++++------ 3 files changed, 18 insertions(+), 14 deletions(-) (limited to 'source/lib/control/include') diff --git a/source/lib/control/include/wanda/control/commander.hpp b/source/lib/control/include/wanda/control/commander.hpp index c993fc0..d7ca73d 100644 --- a/source/lib/control/include/wanda/control/commander.hpp +++ b/source/lib/control/include/wanda/control/commander.hpp @@ -5,7 +5,8 @@ #include "wanda/proto/command.hpp" #include "wanda/proto/message.hpp" -#include +#include +#include #include #include @@ -34,7 +35,7 @@ namespace wanda::control /** * @brief Construct a new commander */ - commander(asio::io_service & service, std::filesystem::path socket, listener & listener); + commander(boost::asio::io_context & service, std::filesystem::path socket, listener & listener); /** * @brief Start communication with the remote daemon endpoint @@ -55,7 +56,7 @@ namespace wanda::control void on_received(connection::pointer connection, proto::message message) override; private: - asio::io_service & m_service; + boost::asio::io_context & m_service; wanda::control::connection::protocol::endpoint m_endpoint; wanda::control::connection::protocol::socket m_socket; wanda::control::connection::pointer m_connection; diff --git a/source/lib/control/include/wanda/control/connection.hpp b/source/lib/control/include/wanda/control/connection.hpp index 1ca451d..0284fd7 100644 --- a/source/lib/control/include/wanda/control/connection.hpp +++ b/source/lib/control/include/wanda/control/connection.hpp @@ -4,7 +4,8 @@ #include "wanda/meta/keyed.hpp" #include "wanda/proto/message.hpp" -#include +#include +#include #include #include @@ -20,7 +21,7 @@ namespace wanda::control */ struct connection : meta::keyed, std::enable_shared_from_this { - using protocol = asio::local::stream_protocol; + using protocol = boost::asio::local::stream_protocol; using pointer = std::shared_ptr; /** @@ -47,7 +48,8 @@ namespace wanda::control * @internal * @brief Construct a new control connection object * - * @note This constructor is keyed on a private key type so it can only be constructed using the #wanda::make_connection factory + * @note This constructor is keyed on a private key type so it can only be constructed using the + * #wanda::make_connection factory */ connection(key, protocol::socket socket); @@ -96,8 +98,8 @@ namespace wanda::control void perform_read(); protocol::socket m_socket; - asio::streambuf m_in{}; - asio::streambuf m_out{}; + boost::asio::streambuf m_in{}; + boost::asio::streambuf m_out{}; std::istream m_input{&m_in}; std::ostream m_output{&m_out}; std::set m_listeners{}; diff --git a/source/lib/control/include/wanda/control/interface.hpp b/source/lib/control/include/wanda/control/interface.hpp index 3dca85f..e895b68 100644 --- a/source/lib/control/include/wanda/control/interface.hpp +++ b/source/lib/control/include/wanda/control/interface.hpp @@ -11,7 +11,8 @@ #include "wanda/meta/keyed.hpp" #include "wanda/proto/command.hpp" -#include +#include +#include #include #include @@ -40,7 +41,7 @@ namespace wanda::control */ struct interface : connection::listener, meta::keyed, std::enable_shared_from_this { - using protocol = asio::local::stream_protocol; + using protocol = boost::asio::local::stream_protocol; using pointer = std::shared_ptr; /** @@ -57,7 +58,7 @@ namespace wanda::control * * @note This constructor is keyed on a private key type so it can only be constructed using the #wanda::make_interface factory */ - interface(key, asio::io_service & service, protocol::endpoint endpoint, listener & listener); + interface(key, boost::asio::io_context & service, protocol::endpoint endpoint, listener & listener); /** * @brief Start handling of controller connections @@ -75,9 +76,9 @@ namespace wanda::control private: void perform_accept(); - friend pointer make_interface(asio::io_service & service, std::filesystem::path file, interface::listener & listener); + friend pointer make_interface(boost::asio::io_context & service, std::filesystem::path file, interface::listener & listener); - asio::io_service & m_service; + boost::asio::io_context & m_service; protocol::endpoint m_endpoint; protocol::socket m_socket; protocol::acceptor m_acceptor; @@ -89,7 +90,7 @@ namespace wanda::control /** * @brief A factory to create new #interface instances */ - interface::pointer make_interface(asio::io_service & service, std::filesystem::path socket, interface::listener & listener); + interface::pointer make_interface(boost::asio::io_context & service, std::filesystem::path socket, interface::listener & listener); } // namespace wanda::control -- cgit v1.2.3