forked from boostorg/beast
Fixes and documentation for teardown and use with SSL:
This solves a problem where clang and gcc locate the deleted version of teardown and async_teardown instead of the overloaded version. It requires overloads to add `teardown_tag` into the signature so that the rules for argument dependent lookup can find the right function. Improve documentation of teardown requirements The documentation is updated to clearly explain the need for including <beast/websocket/ssl.hpp> to use SSL streams with WebSocket. The default implementations of teardown and async_teardown now use static_assert to alert the user of improper usage, with comments providing guidance for resolving the error.
This commit is contained in:
1 parent
a6cb4fdfb2
commit
19f15046b0
7 files changed
+131
-76
No files matched your search
@@ -129,7 +129,7 @@ operator()(error_code ec, bool again)
|
||||
|
||||
template<class AsyncStream>
|
||||
void
|
||||
teardown(
|
||||
teardown(teardown_tag,
|
||||
boost::asio::ssl::stream<AsyncStream>& stream,
|
||||
error_code& ec)
|
||||
{
|
||||
@@ -138,7 +138,7 @@ teardown(
|
||||
|
||||
template<class AsyncStream, class TeardownHandler>
|
||||
void
|
||||
async_teardown(
|
||||
async_teardown(teardown_tag,
|
||||
boost::asio::ssl::stream<AsyncStream>& stream,
|
||||
TeardownHandler&& handler)
|
||||
{
|
||||
|
||||
@@ -128,7 +128,7 @@ operator()(error_code ec, std::size_t, bool again)
|
||||
|
||||
inline
|
||||
void
|
||||
teardown(
|
||||
teardown(teardown_tag,
|
||||
boost::asio::ip::tcp::socket& socket,
|
||||
error_code& ec)
|
||||
{
|
||||
@@ -151,7 +151,7 @@ teardown(
|
||||
template<class TeardownHandler>
|
||||
inline
|
||||
void
|
||||
async_teardown(
|
||||
async_teardown(teardown_tag,
|
||||
boost::asio::ip::tcp::socket& socket,
|
||||
TeardownHandler&& handler)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user