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