fix doc example typo
[boost.git] / boost / asio / ssl / stream_base.hpp
blob245086a708ed43510a539749784b61077a9c8b90
1 //
2 // stream_base.hpp
3 // ~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2005-2008 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 //
11 #ifndef BOOST_ASIO_SSL_STREAM_BASE_HPP
12 #define BOOST_ASIO_SSL_STREAM_BASE_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18 #include <boost/asio/detail/push_options.hpp>
20 #include <boost/asio/detail/push_options.hpp>
21 #include <boost/detail/workaround.hpp>
22 #include <boost/asio/detail/pop_options.hpp>
24 namespace boost {
25 namespace asio {
26 namespace ssl {
28 /// The stream_base class is used as a base for the boost::asio::ssl::stream
29 /// class template so that we have a common place to define various enums.
30 class stream_base
32 public:
33 /// Different handshake types.
34 enum handshake_type
36 /// Perform handshaking as a client.
37 client,
39 /// Perform handshaking as a server.
40 server
43 protected:
44 /// Protected destructor to prevent deletion through this type.
45 ~stream_base()
49 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
50 private:
51 // Workaround to enable the empty base optimisation with Borland C++.
52 char dummy_;
53 #endif
56 } // namespace ssl
57 } // namespace asio
58 } // namespace boost
60 #include <boost/asio/detail/pop_options.hpp>
62 #endif // BOOST_ASIO_SSL_STREAM_BASE_HPP