Boost prep

This commit is contained in:
Vinnie Falco committed 2017-07-23 17:34:13 -07:00
1 parent 3777cb8b9c
commit 7139dd639a
375 files changed
+5253 -3884

No files matched your search

+15 -13
View File
@@ -4,12 +4,14 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/beast
//
#ifndef BEAST_EXAMPLE_COMMON_SSL_STREAM_HPP
#define BEAST_EXAMPLE_COMMON_SSL_STREAM_HPP
#ifndef BOOST_BEAST_EXAMPLE_COMMON_SSL_STREAM_HPP
#define BOOST_BEAST_EXAMPLE_COMMON_SSL_STREAM_HPP
// This include is necessary to work with `ssl::stream` and `beast::websocket::stream`
#include <beast/websocket/ssl.hpp>
// This include is necessary to work with `ssl::stream` and `boost::beast::websocket::stream`
#include <boost/beast/websocket/ssl.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/ssl/stream.hpp>
@@ -292,42 +294,42 @@ public:
template<class SyncStream>
friend
void
teardown(beast::websocket::teardown_tag,
teardown(boost::beast::websocket::teardown_tag,
ssl_stream<SyncStream>& stream,
boost::system::error_code& ec);
template<class AsyncStream, class TeardownHandler>
friend
void
async_teardown(beast::websocket::teardown_tag,
async_teardown(boost::beast::websocket::teardown_tag,
ssl_stream<AsyncStream>& stream, TeardownHandler&& handler);
};
// These hooks are used to inform beast::websocket::stream on
// These hooks are used to inform boost::beast::websocket::stream on
// how to tear down the connection as part of the WebSocket
// protocol specifications
template<class SyncStream>
inline
void
teardown(beast::websocket::teardown_tag,
teardown(boost::beast::websocket::teardown_tag,
ssl_stream<SyncStream>& stream,
boost::system::error_code& ec)
{
// Just forward it to the wrapped ssl::stream
using beast::websocket::teardown;
teardown(beast::websocket::teardown_tag{}, *stream.p_, ec);
using boost::beast::websocket::teardown;
teardown(boost::beast::websocket::teardown_tag{}, *stream.p_, ec);
}
template<class AsyncStream, class TeardownHandler>
inline
void
async_teardown(beast::websocket::teardown_tag,
async_teardown(boost::beast::websocket::teardown_tag,
ssl_stream<AsyncStream>& stream, TeardownHandler&& handler)
{
// Just forward it to the wrapped ssl::stream
using beast::websocket::async_teardown;
async_teardown(beast::websocket::teardown_tag{},
using boost::beast::websocket::async_teardown;
async_teardown(boost::beast::websocket::teardown_tag{},
*stream.p_, std::forward<TeardownHandler>(handler));
}