diff --git a/test/transport/integration.cpp b/test/transport/integration.cpp index 6dcc436e69..9d19778c18 100644 --- a/test/transport/integration.cpp +++ b/test/transport/integration.cpp @@ -203,6 +203,10 @@ void fail_on_open(websocketpp::connection_hdl hdl) { BOOST_FAIL( "expected no open handler" ); } +void delay(websocketpp::connection_hdl hdl, long duration) { + sleep(duration); +} + template void check_ec(T * c, websocketpp::lib::error_code ec, websocketpp::connection_hdl hdl) @@ -233,6 +237,11 @@ void req_pong_timeout(T * c, std::string expected_payload, con->close(websocketpp::close::status::normal,""); } +template +void close(T * e, websocketpp::connection_hdl hdl) { + e->get_con_from_hdl(hdl)->close(websocketpp::close::status::normal,""); +} + // Wait for the specified time period then fail the test void run_test_timer(long value) { sleep(value);