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.
 
 
 
 
 
 

61 lines
1.6 KiB

/*
Sog 游戏基础库
2016 by zouwei
*/
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using ProtoCSStruct;
using Sog;
using Sog.Service;
namespace Mail
{
public class PlayerVerChange
{
public long uid;
public long version;
public int param1;
}
public class MailServerData : IServerDataObj
{
public ServerApp m_app;
public StructPacketSender m_packetSender;
// uid
public Dictionary<long, PlayerInfoMail> m_playerTable = new Dictionary<long, PlayerInfoMail>();
public List<PlayerInfoMail> m_playerForUpdate;
//发邮件列表,版本号控制
public SendMailWithRuleDataToFile m_mailWithRule;
public bool mailWithRuleNeedSave = false;
public MailLangContentData m_mailLang = new MailLangContentData();
/// <summary>
/// 缓存消息队列,先进的先处理
/// 需要线程安全,所以用ConcurrentQueue,这个比加锁效率高
/// </summary>
//public ConcurrentQueue<PlayerVerChange> m_versionChangeQueue = new ConcurrentQueue<PlayerVerChange>();
public ConcurrentQueue<StructPacketData> m_threadSafePacketQueue = new ConcurrentQueue<StructPacketData>();
public MailServerData(ServerApp app)
{
m_app = app;
m_packetSender = new StructPacketSender();
m_packetSender.Init(app.ServerID, app.GetCluster());
}
public override int GetDataType()
{
return MailDataObjType.MailServerData;
}
}
}