mirror of
https://github.com/boostorg/beast.git
synced 2025-07-29 20:37:31 +02:00
Move friend function template definition
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
Version 249:
|
||||
|
||||
* Move friend function template definition
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Version 248:
|
||||
|
||||
* Don't use a moved-from handler
|
||||
|
@ -655,12 +655,7 @@ public:
|
||||
teardown(
|
||||
boost::beast::role_type role,
|
||||
ssl_stream<SyncStream>& stream,
|
||||
boost::system::error_code& ec)
|
||||
{
|
||||
// Just forward it to the underlying ssl::stream
|
||||
using boost::beast::websocket::teardown;
|
||||
teardown(role, *stream.p_, ec);
|
||||
}
|
||||
boost::system::error_code& ec);
|
||||
|
||||
template<class AsyncStream, class TeardownHandler>
|
||||
friend
|
||||
@ -668,16 +663,37 @@ public:
|
||||
async_teardown(
|
||||
boost::beast::role_type role,
|
||||
ssl_stream<AsyncStream>& stream,
|
||||
TeardownHandler&& handler)
|
||||
{
|
||||
// Just forward it to the underlying ssl::stream
|
||||
using boost::beast::websocket::async_teardown;
|
||||
async_teardown(role, *stream.p_,
|
||||
std::forward<TeardownHandler>(handler));
|
||||
}
|
||||
TeardownHandler&& handler);
|
||||
#endif
|
||||
};
|
||||
|
||||
#if ! BOOST_BEAST_DOXYGEN
|
||||
template<class SyncStream>
|
||||
void
|
||||
teardown(
|
||||
boost::beast::role_type role,
|
||||
ssl_stream<SyncStream>& stream,
|
||||
boost::system::error_code& ec)
|
||||
{
|
||||
// Just forward it to the underlying ssl::stream
|
||||
using boost::beast::websocket::teardown;
|
||||
teardown(role, *stream.p_, ec);
|
||||
}
|
||||
|
||||
template<class AsyncStream, class TeardownHandler>
|
||||
void
|
||||
async_teardown(
|
||||
boost::beast::role_type role,
|
||||
ssl_stream<AsyncStream>& stream,
|
||||
TeardownHandler&& handler)
|
||||
{
|
||||
// Just forward it to the underlying ssl::stream
|
||||
using boost::beast::websocket::async_teardown;
|
||||
async_teardown(role, *stream.p_,
|
||||
std::forward<TeardownHandler>(handler));
|
||||
}
|
||||
#endif
|
||||
|
||||
} // beast
|
||||
} // boost
|
||||
|
||||
|
Reference in New Issue
Block a user