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: Version 104:
* Remove unused include * Remove unused include

View File

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