From e77d10a892a834e3004ce7771eea41b57c534c4d Mon Sep 17 00:00:00 2001 From: Tim Oesterreich Date: Wed, 27 Feb 2019 10:42:51 +0100 Subject: review: adapt naming to network TS --- src/lib/tls/asio/asio_async_base.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/tls/asio/asio_async_base.h b/src/lib/tls/asio/asio_async_base.h index e8bc03fee..f476f7155 100644 --- a/src/lib/tls/asio/asio_async_base.h +++ b/src/lib/tls/asio/asio_async_base.h @@ -17,11 +17,11 @@ namespace Botan { namespace TLS { -template +template struct AsyncBase { using allocator_type = boost::asio::associated_allocator_t; - using executor_type = boost::asio::associated_executor_t; + using executor_type = boost::asio::associated_executor_t; allocator_type get_allocator() const noexcept { @@ -30,14 +30,14 @@ struct AsyncBase executor_type get_executor() const noexcept { - return boost::asio::get_associated_executor(m_handler, m_work.get_executor()); + return boost::asio::get_associated_executor(m_handler, m_work_guard_1.get_executor()); } protected: template - AsyncBase(HandlerT&& handler, const Executor& executor) + AsyncBase(HandlerT&& handler, const Executor1& executor) : m_handler(std::forward(handler)) - , m_work(executor) + , m_work_guard_1(executor) { } @@ -48,20 +48,20 @@ struct AsyncBase { // \note(toesterreich): Is this ok to do with bind_handler? Do we need placeholders? boost::asio::post(boost::asio::bind_executor( - m_work.get_executor(), boost::beast::bind_handler(std::move(m_handler), args...)) + m_work_guard_1.get_executor(), boost::beast::bind_handler(std::move(m_handler), args...)) ); - m_work.reset(); + m_work_guard_1.reset(); } else { m_handler(std::forward(args)...); - m_work.reset(); + m_work_guard_1.reset(); } } Handler m_handler; - boost::asio::executor_work_guard m_work; + boost::asio::executor_work_guard m_work_guard_1; }; } } -- cgit v1.2.3