You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
1.2 KiB

/*
Sog 游戏基础库
2016 by zouwei
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Sog;
namespace Gate
{
public class GateServerData : IServerDataObj
{
//public const int MAX_SESSION_ID_COUNT = 10000000;
public ServerApp m_app;
public PacketSender m_packetSender;
//public Queue<uint> m_freeSessionIndexID;
public long SessionIDSeq;
public Dictionary<int, int> m_messageLimitMap;
public GateServerData(ServerApp app)
{
m_app = app;
m_packetSender = new PacketSender();
m_packetSender.Init(app.ServerID, app.GetCluster());
m_messageLimitMap = new Dictionary<int, int>();
/*
//申请1千万个id,加上inst id 刚好32位,24位Max是1千多万
m_freeSessionIndexID = new Queue<uint>(MAX_SESSION_ID_COUNT);
for(uint i=1; i< MAX_SESSION_ID_COUNT; i++)
{
m_freeSessionIndexID.Enqueue(i);
}
*/
}
public override int GetDataType()
{
return GateDataObjType.GateServerData;
}
}
}