Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-13 08:50:38

0001 /* Copyright (c) 2018-2024 Marcelo Zimbres Silva (mzimbres@gmail.com)
0002  *
0003  * Distributed under the Boost Software License, Version 1.0. (See
0004  * accompanying file LICENSE.txt)
0005  */
0006 
0007 #include <boost/redis/connection.hpp>
0008 #include <cstddef>
0009 
0010 namespace boost::redis {
0011 
0012 connection::connection(
0013    executor_type ex,
0014    asio::ssl::context ctx,
0015    std::size_t max_read_size)
0016 : impl_{ex, std::move(ctx), max_read_size}
0017 { }
0018 
0019 connection::connection(
0020    asio::io_context& ioc,
0021    asio::ssl::context ctx,
0022    std::size_t max_read_size)
0023 : impl_{ioc.get_executor(), std::move(ctx), max_read_size}
0024 { }
0025 
0026 void
0027 connection::async_run_impl(
0028    config const& cfg,
0029    logger l,
0030    asio::any_completion_handler<void(boost::system::error_code)> token)
0031 {
0032    impl_.async_run(cfg, l, std::move(token));
0033 }
0034 
0035 void
0036 connection::async_exec_impl(
0037    request const& req,
0038    any_adapter&& adapter,
0039    asio::any_completion_handler<void(boost::system::error_code, std::size_t)> token)
0040 {
0041    impl_.async_exec(req, std::move(adapter), std::move(token));
0042 }
0043 
0044 void connection::cancel(operation op)
0045 {
0046    impl_.cancel(op);
0047 }
0048 
0049 } // namespace boost::redis