connection.ipp 848 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* Copyright (c) 2018-2023 Marcelo Zimbres Silva (mzimbres@gmail.com)
  2. *
  3. * Distributed under the Boost Software License, Version 1.0. (See
  4. * accompanying file LICENSE.txt)
  5. */
  6. #include <boost/redis/connection.hpp>
  7. namespace boost::redis {
  8. connection::connection(
  9. executor_type ex,
  10. asio::ssl::context ctx,
  11. std::size_t max_read_size)
  12. : impl_{ex, std::move(ctx), max_read_size}
  13. { }
  14. connection::connection(
  15. asio::io_context& ioc,
  16. asio::ssl::context ctx,
  17. std::size_t max_read_size)
  18. : impl_{ioc.get_executor(), std::move(ctx), max_read_size}
  19. { }
  20. void
  21. connection::async_run_impl(
  22. config const& cfg,
  23. logger l,
  24. asio::any_completion_handler<void(boost::system::error_code)> token)
  25. {
  26. impl_.async_run(cfg, l, std::move(token));
  27. }
  28. void connection::cancel(operation op)
  29. {
  30. impl_.cancel(op);
  31. }
  32. } // namespace boost::redis