Examples use bind_front_handler

This commit is contained in:
Vinnie Falco
2019-02-14 17:28:54 -08:00
parent 92add2afa6
commit 18447553ca
26 changed files with 248 additions and 397 deletions
+4 -7
View File
@@ -261,19 +261,16 @@ private:
if(s_.empty())
socket_.async_wait(
net::socket_base::wait_read,
std::bind(
bind_front_handler(
&session::on_read,
shared_from_this(),
std::placeholders::_1));
shared_from_this()));
else
net::async_write(
socket_,
net::const_buffer(s_.data(), s_.size()),
std::bind(
bind_front_handler(
&session::on_write,
shared_from_this(),
std::placeholders::_1,
std::placeholders::_2));
shared_from_this()));
}
protected: