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::add_connection(connection_ptr conn) { connections_[conn->get_id()] = conn; LOG(INFO)<<__func__<<",conn size="<<connections_.size()<<", connid="<<conn->get_id(); }