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.
59 lines
1.6 KiB
59 lines
1.6 KiB
/*
|
|
Sog 游戏基础库
|
|
2016 by zouwei
|
|
*/
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using Sog;
|
|
|
|
namespace Gate
|
|
{
|
|
// GateServer用,客户端连接数据
|
|
public class ClientServiceData : IServerDataObj
|
|
{
|
|
public SessionListener m_socketListener;
|
|
public SessionSettings m_socketSetting;
|
|
public IProtoPacker m_protoPacker;
|
|
//private uint m_clientSessionID = 0;
|
|
|
|
public UdpListener m_udpListener;
|
|
public WebSessionListener m_webSessionListener;
|
|
|
|
//等待服务器回应的连接
|
|
public Dictionary<long, GateClientInfo> m_clientsDict;
|
|
//等待后端服务器ack
|
|
public Dictionary<long, GateClientInfo> m_waitServerAckDict;
|
|
//等待客户端公钥请求
|
|
public Dictionary<long, GateClientInfo> m_waitClientPublicKeyDict;
|
|
|
|
public List<long> m_needCloseClients;
|
|
|
|
public long m_lastCheckTimeoutTime = 0;
|
|
|
|
|
|
public bool IsClientSessionID(long sessionID)
|
|
{
|
|
return m_clientsDict.ContainsKey(sessionID);
|
|
}
|
|
|
|
public ClientServiceData()
|
|
{
|
|
m_clientsDict = new Dictionary<long, GateClientInfo>();
|
|
m_waitServerAckDict = new Dictionary<long, GateClientInfo>();
|
|
m_waitClientPublicKeyDict = new Dictionary<long, GateClientInfo>();
|
|
m_needCloseClients = new List<long>();
|
|
|
|
m_protoPacker = new SProtoPacker();
|
|
}
|
|
|
|
public override int GetDataType()
|
|
{
|
|
return GateDataObjType.ClientServiceData;
|
|
}
|
|
}
|
|
}
|
|
|