Fix compile error in websocket snippet

This commit is contained in:
Vinnie Falco
2017-08-10 16:27:49 -07:00
parent 126bea987c
commit 483a4c5da5
2 changed files with 21 additions and 18 deletions

View File

@@ -1,3 +1,9 @@
Version 105:
* Fix compile error in websocket snippet
--------------------------------------------------------------------------------
Version 104:
* Remove unused include

View File

@@ -234,23 +234,20 @@ void echo(stream<boost::asio::ip::tcp::socket>& ws,
//[ws_snippet_22
struct custom_stream
{
friend
void
teardown(
role_type role,
custom_stream& stream,
error_code& ec);
struct custom_stream;
template<class TeardownHandler>
friend
void
async_teardown(
role_type role,
custom_stream& stream,
TeardownHandler&& handler);
};
void
teardown(
role_type role,
custom_stream& stream,
error_code& ec);
template<class TeardownHandler>
void
async_teardown(
role_type role,
custom_stream& stream,
TeardownHandler&& handler);
//]
@@ -272,7 +269,7 @@ struct custom_wrapper
void
teardown(
role_type role,
custom_stream& stream,
custom_wrapper& stream,
error_code& ec)
{
using boost::beast::websocket::teardown;
@@ -284,7 +281,7 @@ struct custom_wrapper
void
async_teardown(
role_type role,
custom_stream& stream,
custom_wrapper& stream,
TeardownHandler&& handler)
{
using boost::beast::websocket::async_teardown;