diff options
author | Tim Oesterreich <[email protected]> | 2019-02-27 10:42:51 +0100 |
---|---|---|
committer | Hannes Rantzsch <[email protected]> | 2019-04-16 10:48:02 +0200 |
commit | e77d10a892a834e3004ce7771eea41b57c534c4d (patch) | |
tree | 5c704d1175aedacac4112d3d7e4ec8b2e4828989 /src/lib/tls/asio/asio_async_base.h | |
parent | 471f014e77fe7bdf291981ebebb941174d49f271 (diff) |
review: adapt naming to network TS
Diffstat (limited to 'src/lib/tls/asio/asio_async_base.h')
-rw-r--r-- | src/lib/tls/asio/asio_async_base.h | 18 |
1 files 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 <class Handler, class Executor, class Allocator> +template <class Handler, class Executor1, class Allocator> struct AsyncBase { using allocator_type = boost::asio::associated_allocator_t<Handler, Allocator>; - using executor_type = boost::asio::associated_executor_t<Handler, Executor>; + using executor_type = boost::asio::associated_executor_t<Handler, Executor1>; 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 <class HandlerT> - AsyncBase(HandlerT&& handler, const Executor& executor) + AsyncBase(HandlerT&& handler, const Executor1& executor) : m_handler(std::forward<HandlerT>(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>(args)...); - m_work.reset(); + m_work_guard_1.reset(); } } Handler m_handler; - boost::asio::executor_work_guard<executor_type> m_work; + boost::asio::executor_work_guard<Executor1> m_work_guard_1; }; } } |