Examples use bind_front_handler

This commit is contained in:
Vinnie Falco
2019-02-14 16:20:27 -08:00
parent 92add2afa6
commit 18447553ca
26 changed files with 248 additions and 397 deletions

View File

@@ -206,11 +206,9 @@ run()
// Read a request
http::async_read(stream_, buffer_, req_,
std::bind(
beast::bind_front_handler(
&http_session::on_read,
shared_from_this(),
std::placeholders::_1,
std::placeholders::_2));
shared_from_this()));
}
// Report a failure
@@ -348,9 +346,7 @@ on_write(beast::error_code ec, std::size_t, bool close)
// Read another request
http::async_read(stream_, buffer_, req_,
std::bind(
beast::bind_front_handler(
&http_session::on_read,
shared_from_this(),
std::placeholders::_1,
std::placeholders::_2));
shared_from_this()));
}