adjust transport async_accept and async_connect to use connection_ptr instead of connection_hdl

prevents a newly created connection_ptr from being destroyed
immediately after accepting or connecting.
This commit is contained in:
Peter Thorson
2013-10-06 10:51:41 -05:00
parent 96f7d0f3f2
commit b934e71ace
8 changed files with 106 additions and 129 deletions

View File

@@ -156,14 +156,12 @@ struct mock_endpoint : public websocketpp::transport::asio::endpoint<config> {
&mock_endpoint::handle_connect,
this,
m_con,
websocketpp::lib::placeholders::_1,
websocketpp::lib::placeholders::_2
websocketpp::lib::placeholders::_1
)
);
}
void handle_connect(connection_ptr con, websocketpp::connection_hdl,
const websocketpp::lib::error_code & ec)
void handle_connect(connection_ptr con, websocketpp::lib::error_code const & ec)
{
BOOST_CHECK( !ec );
con->start();