mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 12:57: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:
|
Version 248:
|
||||||
|
|
||||||
* Don't use a moved-from handler
|
* Don't use a moved-from handler
|
||||||
|
@ -655,12 +655,7 @@ public:
|
|||||||
teardown(
|
teardown(
|
||||||
boost::beast::role_type role,
|
boost::beast::role_type role,
|
||||||
ssl_stream<SyncStream>& stream,
|
ssl_stream<SyncStream>& stream,
|
||||||
boost::system::error_code& ec)
|
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>
|
template<class AsyncStream, class TeardownHandler>
|
||||||
friend
|
friend
|
||||||
@ -668,16 +663,37 @@ public:
|
|||||||
async_teardown(
|
async_teardown(
|
||||||
boost::beast::role_type role,
|
boost::beast::role_type role,
|
||||||
ssl_stream<AsyncStream>& stream,
|
ssl_stream<AsyncStream>& stream,
|
||||||
TeardownHandler&& handler)
|
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
|
#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
|
} // beast
|
||||||
} // boost
|
} // boost
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user