2 // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // Official repository: https://github.com/boostorg/beast
10 #ifndef BOOST_BEAST_WEBSOCKET_IMPL_SSL_IPP_INCLUDED
11 #define BOOST_BEAST_WEBSOCKET_IMPL_SSL_IPP_INCLUDED
22 http://stackoverflow.com/questions/32046034/what-is-the-proper-way-to-securely-disconnect-an-asio-ssl-socket/32054476#32054476
24 Behavior of ssl::stream regarding close_
26 If the remote host calls async_shutdown then the
27 local host's async_read will complete with eof.
29 If both hosts call async_shutdown then the calls
30 to async_shutdown will complete with eof.
34 template<class AsyncStream>
38 boost::asio::ssl::stream<AsyncStream>& stream,
46 class TeardownHandler>
50 boost::asio::ssl::stream<AsyncStream>& stream,
51 TeardownHandler&& handler)
53 stream.async_shutdown(
54 std::forward<TeardownHandler>(handler));