forked from boostorg/beast
Examples use bind_front_handler
This commit is contained in:
@@ -60,10 +60,9 @@ public:
|
||||
{
|
||||
// Accept the websocket handshake
|
||||
ws_.async_accept(
|
||||
std::bind(
|
||||
beast::bind_front_handler(
|
||||
&session::on_accept,
|
||||
shared_from_this(),
|
||||
std::placeholders::_1));
|
||||
shared_from_this()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -82,11 +81,9 @@ public:
|
||||
// Read a message into our buffer
|
||||
ws_.async_read(
|
||||
buffer_,
|
||||
std::bind(
|
||||
beast::bind_front_handler(
|
||||
&session::on_read,
|
||||
shared_from_this(),
|
||||
std::placeholders::_1,
|
||||
std::placeholders::_2));
|
||||
shared_from_this()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -107,11 +104,9 @@ public:
|
||||
ws_.text(ws_.got_text());
|
||||
ws_.async_write(
|
||||
buffer_.data(),
|
||||
std::bind(
|
||||
beast::bind_front_handler(
|
||||
&session::on_write,
|
||||
shared_from_this(),
|
||||
std::placeholders::_1,
|
||||
std::placeholders::_2));
|
||||
shared_from_this()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -194,11 +189,9 @@ public:
|
||||
do_accept()
|
||||
{
|
||||
acceptor_.async_accept(
|
||||
std::bind(
|
||||
beast::bind_front_handler(
|
||||
&listener::on_accept,
|
||||
shared_from_this(),
|
||||
std::placeholders::_1,
|
||||
std::placeholders::_2));
|
||||
shared_from_this()));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user