stream_base.hpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // ssl/stream_base.hpp
  3. // ~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef BOOST_ASIO_SSL_STREAM_BASE_HPP
  11. #define BOOST_ASIO_SSL_STREAM_BASE_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include <boost/asio/detail/config.hpp>
  16. #include <boost/asio/detail/push_options.hpp>
  17. namespace boost {
  18. namespace asio {
  19. namespace ssl {
  20. /// The stream_base class is used as a base for the boost::asio::ssl::stream
  21. /// class template so that we have a common place to define various enums.
  22. class stream_base
  23. {
  24. public:
  25. /// Different handshake types.
  26. enum handshake_type
  27. {
  28. /// Perform handshaking as a client.
  29. client,
  30. /// Perform handshaking as a server.
  31. server
  32. };
  33. protected:
  34. /// Protected destructor to prevent deletion through this type.
  35. ~stream_base()
  36. {
  37. }
  38. };
  39. } // namespace ssl
  40. } // namespace asio
  41. } // namespace boost
  42. #include <boost/asio/detail/pop_options.hpp>
  43. #endif // BOOST_ASIO_SSL_STREAM_BASE_HPP