updates asio on_tcp_init callback to new api

This commit is contained in:
Peter Thorson
2013-01-06 10:10:35 -06:00
parent ce7b09767a
commit f5d4cbe143
3 changed files with 10 additions and 3 deletions

View File

@@ -85,6 +85,10 @@ void on_interrupt(server* s, websocketpp::connection_hdl hdl) {
std::cout << "on_interrupt called with hdl: " << hdl.lock().get() << std::endl;
}
void on_tcp_init(websocketpp::connection_hdl hdl) {
std::cout << "on_tcp_init called with hdl: " << hdl.lock().get() << std::endl;
}
using websocketpp::lib::placeholders::_1;
using websocketpp::lib::bind;
@@ -101,6 +105,7 @@ int main() {
//echo_server.set_open_handler(websocketpp::lib::bind(&test_handler::on_open,t,websocketpp::lib::placeholders::_1));
echo_server.set_open_handler(bind(&on_open,&echo_server,::_1));
echo_server.set_interrupt_handler(bind(&on_interrupt,&echo_server,::_1));
echo_server.set_tcp_init_handler(&on_tcp_init);
// Listen
echo_server.listen(9002);