void RecordServer::remove_connection(connection_ptr conn) { context_ptr context(boost::any_cast<context_ptr>(conn->get_context())); //sub_conns_.erase(context->id()); conn->set_context(context_ptr(nullptr)); connections_.erase(conn->get_id()); LOG(INFO)<<__func__<<",conn size"<<connections_.size()<<", connid="<<conn->get_id(); }
void GatewayServer::on_connected(connection_ptr conn) { context_ptr task(new GatewayTask(conn)); conn->set_context(task); //get_logic_service().post(boost::bind(&GatewayServer::add_connection, this, conn)); }
void RecordServer::on_connected(connection_ptr conn) { context_ptr task(new RecordTask(conn)); conn->set_context(task); get_logic_service().post(boost::bind(&RecordServer::add_connection, this, conn)); }