123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifndef BOOST_BEAST_CORE_SSL_STREAM_HPP
- #define BOOST_BEAST_CORE_SSL_STREAM_HPP
- #include <boost/beast/core/detail/config.hpp>
- #include <boost/beast/websocket/ssl.hpp>
- #include <boost/asio/ssl/error.hpp>
- #include <boost/asio/ssl/stream.hpp>
- namespace boost {
- namespace beast {
- template<class NextLayer>
- struct ssl_stream : net::ssl::stream<NextLayer>
- {
- using net::ssl::stream<NextLayer>::stream;
- };
- #if ! BOOST_BEAST_DOXYGEN
- template<class SyncStream>
- void
- teardown(
- boost::beast::role_type role,
- ssl_stream<SyncStream>& stream,
- boost::system::error_code& ec)
- {
-
- using boost::beast::websocket::teardown;
- teardown(role, static_cast<net::ssl::stream<SyncStream>&>(stream), ec);
- }
- template<class AsyncStream,
- typename TeardownHandler = net::default_completion_token_t<beast::executor_type<AsyncStream>>>
- void
- async_teardown(
- boost::beast::role_type role,
- ssl_stream<AsyncStream>& stream,
- TeardownHandler&& handler = net::default_completion_token_t<beast::executor_type<AsyncStream>>{})
- {
-
- using boost::beast::websocket::async_teardown;
- async_teardown(role, static_cast<net::ssl::stream<AsyncStream>&>(stream),
- std::forward<TeardownHandler>(handler));
- }
- #endif
- }
- }
- #endif
|