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.
 
 
 
 
 
 

50 lines
1.2 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Sog;
using Google.Protobuf.WellKnownTypes;
using Google.Protobuf;
namespace SMCenter
{
public enum EClientType
{
None = 0,
Agent = 1,
Console = 2,
}
public class ClientInfo
{
//这个需要主动注册
public string HostName;
public EClientType ClientType = EClientType.None;
public long SessionID;
// close when gameserver timeout
public long ConnectedTime;
public NetSession Session;
public long LastPingTime;
//serverID 的模式是 *.*.* ,只要包含一个*通配符,就等于是排除了所有的
//就放这里了,这个东西万一要支持多个console这个不用变
public List<string> m_disableServerID = new List<string>();
public ClientInfo(long time, NetSession session)
{
Session = session;
SessionID = session.SessionID;
ConnectedTime = time;
}
public void SendMsg(IMessage pbMessage, SMMsgID iMsgID)
{
SMCenterNet.Instance.SendMsg(this, iMsgID, pbMessage);
}
}
}