ssl.hpp 832 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // Copyright (c) 2023-2025 Ivica Siladic, Bruno Iljazovic, Korina Simicevic
  3. //
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. #ifndef BOOST_MQTT5_SSL_HPP
  8. #define BOOST_MQTT5_SSL_HPP
  9. #include <boost/mqtt5/detail/async_traits.hpp>
  10. #include <boost/mqtt5/detail/shutdown.hpp>
  11. #include <boost/mqtt5/types.hpp>
  12. #include <boost/asio/ssl.hpp>
  13. namespace boost::mqtt5 {
  14. namespace detail {
  15. // in namespace boost::mqtt5::detail to enable ADL
  16. template <typename Stream, typename ShutdownHandler>
  17. void async_shutdown(
  18. boost::asio::ssl::stream<Stream>& stream, ShutdownHandler&& handler
  19. ) {
  20. stream.async_shutdown(std::move(handler));
  21. }
  22. } // end namespace detail
  23. } // end namespace boost::mqtt5
  24. #endif // !BOOST_MQTT5_SSL_HPP