Use std::bind for control_callback

This commit is contained in:
Vinnie Falco
2019-02-15 17:52:57 -08:00
parent 2e62f25701
commit ca1b620527
2 changed files with 8 additions and 4 deletions

View File

@ -261,9 +261,11 @@ public:
// Set the control callback. This will be called
// on every incoming ping, pong, and close frame.
derived().ws().control_callback(
beast::bind_front_handler(
std::bind(
&websocket_session::on_control_callback,
this));
this,
std::placeholders::_1,
std::placeholders::_2));
// VFALCO What about the timer?

View File

@ -243,9 +243,11 @@ public:
// Set the control callback. This will be called
// on every incoming ping, pong, and close frame.
ws_.control_callback(
beast::bind_front_handler(
std::bind(
&websocket_session::on_control_callback,
this));
this,
std::placeholders::_1,
std::placeholders::_2));
// Run the timer. The timer is operated
// continuously, this simplifies the code.