diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/AxibugEmuOnline.Server.csproj b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/AxibugEmuOnline.Server.csproj
new file mode 100644
index 00000000..3d4aa884
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/AxibugEmuOnline.Server.csproj
@@ -0,0 +1,19 @@
+
+
+
+ Exe
+ net8.0
+ enable
+ enable
+
+
+
+
+ ..\..\Lib\Google.Protobuf.dll
+
+
+ ..\..\Lib\HaoYueNet.ServerNetwork.dll
+
+
+
+
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/AxibugEmuOnline.Server.csproj.user b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/AxibugEmuOnline.Server.csproj.user
new file mode 100644
index 00000000..939e9d61
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/AxibugEmuOnline.Server.csproj.user
@@ -0,0 +1,6 @@
+
+
+
+ <_LastSelectedProfileId>G:\Sin365\AxibugEmuOnline\AxibugEmuOnline.Server\AxibugEmuOnline.Server\Properties\PublishProfiles\FolderProfile.pubxml
+
+
\ No newline at end of file
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Common/Helper.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Common/Helper.cs
new file mode 100644
index 00000000..9d5a2782
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Common/Helper.cs
@@ -0,0 +1,20 @@
+namespace AxibugEmuOnline.Server.Common
+{
+ public static class Helper
+ {
+ public static long GetNowTimeStamp()
+ {
+ return GetTimeStamp(DateTime.Now);
+ }
+
+ ///
+ /// 获取时间戳
+ ///
+ ///
+ public static long GetTimeStamp(DateTime dt)
+ {
+ TimeSpan ts = dt - new DateTime(1970, 1, 1, 0, 0, 0, 0);
+ return Convert.ToInt64(ts.TotalSeconds);
+ }
+ }
+}
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Common/ProtoBufHelper.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Common/ProtoBufHelper.cs
new file mode 100644
index 00000000..15546784
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Common/ProtoBufHelper.cs
@@ -0,0 +1,22 @@
+using Google.Protobuf;
+
+namespace AxibugEmuOnline.Server.Common
+{
+ public static class ProtoBufHelper
+ {
+
+ public static byte[] Serizlize(IMessage msg)
+ {
+ return msg.ToByteArray();
+ }
+
+ public static T DeSerizlize(byte[] bytes)
+ {
+ var msgType = typeof(T);
+ object msg = Activator.CreateInstance(msgType);
+ ((IMessage)msg).MergeFrom(bytes);
+ return (T)msg;
+ }
+ }
+
+}
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Event/EEvent.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Event/EEvent.cs
new file mode 100644
index 00000000..a4d03992
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Event/EEvent.cs
@@ -0,0 +1,9 @@
+namespace AxibugEmuOnline.Server.Event
+{
+ public enum EEvent
+ {
+ // 添加你自己需要的事件类型
+ OnUserJoin,
+ OnUserLeave
+ }
+}
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Event/EventSystem.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Event/EventSystem.cs
new file mode 100644
index 00000000..7fb37505
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Event/EventSystem.cs
@@ -0,0 +1,216 @@
+using AxibugEmuOnline.Server.Manager;
+
+namespace AxibugEmuOnline.Server.Event
+{
+
+ public class EventSystem
+ {
+ private static EventSystem instance = new EventSystem();
+ public static EventSystem Instance { get { return instance; } }
+
+ private Dictionary> eventDic = new Dictionary>(128);
+
+ private EventSystem() { }
+
+
+ #region RegisterEvent
+ public void RegisterEvent(EEvent evt, Action callback)
+ {
+ InterRegisterEvent(evt, callback);
+ }
+
+ public void RegisterEvent(EEvent evt, Action callback)
+ {
+ InterRegisterEvent(evt, callback);
+ }
+
+ public void RegisterEvent(EEvent evt, Action callback)
+ {
+ InterRegisterEvent(evt, callback);
+ }
+
+ public void RegisterEvent(EEvent evt, Action callback)
+ {
+ InterRegisterEvent(evt, callback);
+ }
+
+ public void RegisterEvent(EEvent evt, Action callback)
+ {
+ InterRegisterEvent(evt, callback);
+ }
+
+ private void InterRegisterEvent(EEvent evt, Delegate callback)
+ {
+ if (eventDic.ContainsKey(evt))
+ {
+ if (eventDic[evt].IndexOf(callback) < 0)
+ {
+ eventDic[evt].Add(callback);
+ }
+ }
+ else
+ {
+ eventDic.Add(evt, new List() { callback });
+ }
+ }
+ #endregion
+
+ #region UnregisterEvent
+
+ public void UnregisterEvent(EEvent evt, Action callback)
+ {
+ Delegate tempDelegate = callback;
+ InterUnregisterEvent(evt, tempDelegate);
+ }
+
+ public void UnregisterEvent(EEvent evt, Action callback)
+ {
+ Delegate tempDelegate = callback;
+ InterUnregisterEvent(evt, tempDelegate);
+ }
+
+ public void UnregisterEvent(EEvent evt, Action callback)
+ {
+ Delegate tempDelegate = callback;
+ InterUnregisterEvent(evt, tempDelegate);
+ }
+
+ public void UnregisterEvent(EEvent evt, Action callback)
+ {
+ Delegate tempDelegate = callback;
+ InterUnregisterEvent(evt, tempDelegate);
+ }
+
+ public void UnregisterEvent(EEvent evt, Action callback)
+ {
+ Delegate tempDelegate = callback;
+ InterUnregisterEvent(evt, tempDelegate);
+ }
+
+ private void InterUnregisterEvent(EEvent evt, Delegate callback)
+ {
+ if (eventDic.ContainsKey(evt))
+ {
+ eventDic[evt].Remove(callback);
+ if (eventDic[evt].Count == 0) eventDic.Remove(evt);
+ }
+ }
+ #endregion
+
+ #region PostEvent
+ public void PostEvent(EEvent evt, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
+ {
+ List eventList = GetEventList(evt);
+ if (eventList != null)
+ {
+ foreach (Delegate callback in eventList)
+ {
+ try
+ {
+ ((Action)callback)(arg1, arg2, arg3, arg4);
+ }
+ catch (Exception e)
+ {
+ ServerManager.g_Log.Error(e.Message);
+ }
+ }
+ }
+ }
+
+ public void PostEvent(EEvent evt, T1 arg1, T2 arg2, T3 arg3)
+ {
+ List eventList = GetEventList(evt);
+ if (eventList != null)
+ {
+ foreach (Delegate callback in eventList)
+ {
+ try
+ {
+ ((Action)callback)(arg1, arg2, arg3);
+ }
+ catch (Exception e)
+ {
+ ServerManager.g_Log.Error(e.Message);
+ }
+ }
+ }
+ }
+
+ public void PostEvent(EEvent evt, T1 arg1, T2 arg2)
+ {
+ List eventList = GetEventList(evt);
+ if (eventList != null)
+ {
+ foreach (Delegate callback in eventList)
+ {
+ try
+ {
+ ((Action)callback)(arg1, arg2);
+ }
+ catch (Exception e)
+ {
+ ServerManager.g_Log.Error(e.Message);
+ }
+ }
+ }
+ }
+
+ public void PostEvent(EEvent evt, T arg)
+ {
+ List eventList = GetEventList(evt);
+ if (eventList != null)
+ {
+ foreach (Delegate callback in eventList)
+ {
+ try
+ {
+ ((Action)callback)(arg);
+ }
+ catch (Exception e)
+ {
+ ServerManager.g_Log.Error(e.Message + ", method name : " + callback.Method);
+ }
+ }
+ }
+
+ }
+
+ public void PostEvent(EEvent evt)
+ {
+ List eventList = GetEventList(evt);
+ if (eventList != null)
+ {
+ foreach (Delegate callback in eventList)
+ {
+ try
+ {
+ ((Action)callback)();
+ }
+ catch (Exception e)
+ {
+ ServerManager.g_Log.Error(e.Message);
+ }
+ }
+ }
+ }
+ #endregion
+
+ ///
+ /// 获取所有事件
+ ///
+ ///
+ ///
+ private List GetEventList(EEvent evt)
+ {
+ if (eventDic.ContainsKey(evt))
+ {
+ List tempList = eventDic[evt];
+ if (null != tempList)
+ {
+ return tempList;
+ }
+ }
+ return null;
+ }
+ }
+}
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/ChatManager.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/ChatManager.cs
new file mode 100644
index 00000000..07731689
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/ChatManager.cs
@@ -0,0 +1,29 @@
+using AxibugProtobuf;
+using AxibugEmuOnline.Server.Common;
+using AxibugEmuOnline.Server.NetWork;
+using System.Net.Sockets;
+
+namespace AxibugEmuOnline.Server.Manager
+{
+ public class ChatManager
+ {
+ public ChatManager()
+ {
+ NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdChatmsg, RecvPlayerChatMsg);
+ }
+
+ public void RecvPlayerChatMsg(Socket sk, byte[] reqData)
+ {
+ ClientInfo _c = ServerManager.g_ClientMgr.GetClientForSocket(sk);
+ ServerManager.g_Log.Debug("收到聊天消息请求");
+ Protobuf_ChatMsg msg = ProtoBufHelper.DeSerizlize(reqData);
+ byte[] respData = ProtoBufHelper.Serizlize(new Protobuf_ChatMsg_RESP()
+ {
+ ChatMsg = msg.ChatMsg,
+ NickName = _c.Account,
+ Date = Helper.GetNowTimeStamp()
+ });
+ ServerManager.g_ClientMgr.ClientSendALL((int)CommandID.CmdChatmsg, (int)ErrorCode.ErrorOk, respData);
+ }
+ }
+}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/ClientManager.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/ClientManager.cs
new file mode 100644
index 00000000..99ed3c2d
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/ClientManager.cs
@@ -0,0 +1,241 @@
+using AxibugProtobuf;
+using System.Net.Sockets;
+using System.Timers;
+
+namespace AxibugEmuOnline.Server.Manager
+{
+ public class ClientInfo
+ {
+ public long UID { get; set; }
+ public string Account { get; set; }
+ public Socket _socket { get; set; }
+ public bool IsOffline { get; set; } = false;
+ public DateTime LogOutDT { get; set; }
+
+
+ }
+
+ public class ClientManager
+ {
+ private List ClientList = new List();
+ private Dictionary _DictSocketClient = new Dictionary();
+ private Dictionary _DictUIDClient = new Dictionary();
+ private long TestUIDSeed = 0;
+
+ private System.Timers.Timer _ClientCheckTimer;
+ private long _RemoveOfflineCacheMin;
+ ///
+ /// 初始化并指定检查时间
+ ///
+ /// tick检查毫秒数
+ /// 清理掉线分钟数
+ public void Init(long ticktime, long RemoveOfflineCacheMin)
+ {
+ //换算成毫秒
+ _RemoveOfflineCacheMin = RemoveOfflineCacheMin;
+ _ClientCheckTimer = new System.Timers.Timer();
+ _ClientCheckTimer.Interval = ticktime;
+ _ClientCheckTimer.AutoReset = true;
+ _ClientCheckTimer.Elapsed += new ElapsedEventHandler(ClientCheckClearOffline_Elapsed);
+ _ClientCheckTimer.Enabled = true;
+ }
+
+ public long GetNextUID()
+ {
+ return ++TestUIDSeed;
+ }
+
+ private void ClientCheckClearOffline_Elapsed(object sender, ElapsedEventArgs e)
+ {
+ DateTime CheckDT = DateTime.Now.AddMinutes(-1 * _RemoveOfflineCacheMin);
+ ClientInfo[] OfflineClientlist = ClientList.Where(w => w.IsOffline == true && w.LogOutDT < CheckDT).ToArray();
+
+ Console.WriteLine("开始清理离线过久的玩家的缓存");
+ for (int i = 0; i < OfflineClientlist.Length; i++)
+ {
+ //to do 掉线处理
+ RemoveClient(OfflineClientlist[i]);
+ }
+ GC.Collect();
+ }
+
+
+ //通用处理
+ #region clientlist 处理
+
+ public ClientInfo JoinNewClient(Protobuf_Login data, Socket _socket)
+ {
+ //也许这个函数需加lock
+ ClientInfo cinfo = GetClientForSocket(_socket);
+ //如果连接还在
+ if (cinfo != null)
+ {
+ cinfo.IsOffline = false;
+ }
+ else
+ {
+ cinfo = new ClientInfo()
+ {
+ UID = GetNextUID(),
+ _socket = _socket,
+ Account = data.Account,
+ IsOffline = false,
+ };
+ AddClient(cinfo);
+ }
+ return cinfo;
+ }
+
+
+ ///
+ /// 增加用户
+ ///
+ ///
+ void AddClient(ClientInfo clientInfo)
+ {
+ try
+ {
+ Console.WriteLine("追加连接玩家 UID=>" + clientInfo.UID + " | " + clientInfo.Account);
+ lock (ClientList)
+ {
+ _DictUIDClient.Add(clientInfo.UID, clientInfo);
+ _DictSocketClient.Add(clientInfo._socket, clientInfo);
+ ClientList.Add(clientInfo);
+ }
+ }
+ catch (Exception ex)
+ {
+ ex.ToString();
+ }
+ }
+
+ ///
+ /// 清理连接
+ ///
+ ///
+ public void RemoveClient(ClientInfo client)
+ {
+ lock (ClientList)
+ {
+ if (_DictUIDClient.ContainsKey(client.UID))
+ _DictUIDClient.Remove(client.UID);
+
+ if (_DictSocketClient.ContainsKey(client._socket))
+ _DictSocketClient.Remove(client._socket);
+
+ ClientList.Remove(client);
+ }
+ }
+
+ ///
+ /// 清理连接
+ ///
+ ///
+ public bool GetClientByUID(long uid,out ClientInfo client)
+ {
+ lock (ClientList)
+ {
+ if (!_DictUIDClient.ContainsKey(uid))
+ {
+ client = null;
+ return false;
+ }
+
+ client = _DictUIDClient[uid];
+ return true;
+ }
+ }
+
+
+ public ClientInfo GetClientForSocket(Socket sk)
+ {
+ return _DictSocketClient.ContainsKey(sk) ? _DictSocketClient[sk] : null;
+ }
+
+ ///
+ /// 获取在线玩家
+ ///
+ ///
+ public List GetOnlineClientList()
+ {
+ return ClientList.Where(w => w.IsOffline == false).ToList();
+ }
+
+
+ ///
+ /// 设置玩家离线
+ ///
+ ///
+ public void SetClientOfflineForSocket(Socket sk)
+ {
+ if (!_DictSocketClient.ContainsKey(sk))
+ return;
+
+ ClientInfo cinfo = _DictSocketClient[sk];
+ Console.WriteLine("标记玩家UID" + cinfo.UID + "为离线");
+ cinfo.IsOffline = true;
+ cinfo.LogOutDT = DateTime.Now;
+ }
+
+ public void RemoveClientForSocket(Socket sk)
+ {
+ if (!_DictSocketClient.ContainsKey(sk))
+ return;
+
+ RemoveClient(_DictSocketClient[sk]);
+ }
+
+ #endregion
+
+ public void ClientSendALL(int CMDID, int ERRCODE, byte[] data, long SkipUID = -1)
+ {
+ ClientSend(ClientList, CMDID, ERRCODE, data, SkipUID);
+ }
+
+ ///
+ /// 给一组用户发送数据
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void ClientSend(List _toclientlist, int CMDID, int ERRCODE, byte[] data,long SkipUID = -1)
+ {
+ for (int i = 0; i < _toclientlist.Count(); i++)
+ {
+ if (_toclientlist[i] == null || _toclientlist[i].IsOffline)
+ continue;
+
+ if(SkipUID > -1 && _toclientlist[i].UID == SkipUID)
+ continue;
+
+ ServerManager.g_SocketMgr.SendToSocket(_toclientlist[i]._socket, CMDID, ERRCODE, data);
+ }
+ }
+
+ public void ClientSend(Socket _socket, int CMDID, int ERRCODE, byte[] data)
+ {
+ //Console.WriteLine("发送数据 CMDID->"+ CMDID);
+ ServerManager.g_SocketMgr.SendToSocket(_socket, CMDID, ERRCODE, data);
+ }
+
+ ///
+ /// 给一个连接发送数据
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void ClientSend(ClientInfo _c, int CMDID, int ERRCODE, byte[] data)
+ {
+ if (_c == null || _c.IsOffline)
+ return;
+ ServerManager.g_SocketMgr.SendToSocket(_c._socket, CMDID, ERRCODE, data);
+ }
+
+ public int GetOnlineClient()
+ {
+ return ClientList.Where(w => !w.IsOffline).Count();
+ }
+ }
+}
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/GameManager.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/GameManager.cs
new file mode 100644
index 00000000..29cc0df2
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/GameManager.cs
@@ -0,0 +1,26 @@
+using AxibugEmuOnline.Server.Common;
+using AxibugEmuOnline.Server.Manager;
+using AxibugEmuOnline.Server.NetWork;
+using AxibugProtobuf;
+using System.Net;
+using System.Net.Sockets;
+
+namespace AxibugEmuOnline.Server
+{
+
+ public class GameManager
+ {
+ public GameManager()
+ {
+ NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdScreen, OnCmdScreen);
+ }
+
+ public void OnCmdScreen(Socket sk, byte[] reqData)
+ {
+ ServerManager.g_Log.Debug($"OnCmdScreen lenght:{reqData.Length}");
+ ClientInfo _c = ServerManager.g_ClientMgr.GetClientForSocket(sk);
+ Protobuf_Screnn_Frame msg = ProtoBufHelper.DeSerizlize(reqData);
+ ServerManager.g_ClientMgr.ClientSendALL((int)CommandID.CmdScreen, (int)ErrorCode.ErrorOk, reqData, _c.UID);
+ }
+ }
+}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/LogManager.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/LogManager.cs
new file mode 100644
index 00000000..927f0b22
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/LogManager.cs
@@ -0,0 +1,29 @@
+namespace AxibugEmuOnline.Server.Manager
+{
+ public class LogManager
+ {
+ public void Info(string str)
+ {
+ Console.WriteLine(str);
+ }
+ public void Debug(string str)
+ {
+ Console.WriteLine(str);
+ }
+
+ public void Warning(string str)
+ {
+ Console.WriteLine(str);
+ }
+
+ public void Error(string str)
+ {
+ Console.WriteLine(str);
+ }
+
+ public void Log(int logtype, string str)
+ {
+ Console.WriteLine(str);
+ }
+ }
+}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/LoginManager.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/LoginManager.cs
new file mode 100644
index 00000000..a7e4fe9c
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/LoginManager.cs
@@ -0,0 +1,32 @@
+using AxibugProtobuf;
+using AxibugEmuOnline.Server.Common;
+using AxibugEmuOnline.Server.NetWork;
+using System.Net.Sockets;
+
+namespace AxibugEmuOnline.Server.Manager
+{
+ public class LoginManager
+ {
+ public LoginManager()
+ {
+ NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdLogin, UserLogin);
+ }
+
+ public void UserLogin(Socket _socket, byte[] reqData)
+ {
+ ServerManager.g_Log.Debug("收到新的登录请求");
+ Protobuf_Login msg = ProtoBufHelper.DeSerizlize(reqData);
+ ClientInfo cinfo = ServerManager.g_ClientMgr.JoinNewClient(msg, _socket);
+
+ byte[] respData = ProtoBufHelper.Serizlize(new Protobuf_Login_RESP()
+ {
+ Status = LoginResultStatus.Ok,
+ RegDate = "",
+ LastLoginDate = "",
+ Token = "",
+ UID = cinfo.UID
+ });
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/ServerManager.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/ServerManager.cs
new file mode 100644
index 00000000..00a36c84
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Manager/ServerManager.cs
@@ -0,0 +1,33 @@
+using AxibugEmuOnline.Server.Manager;
+using AxibugEmuOnline.Server.NetWork;
+using System.Net;
+
+namespace AxibugEmuOnline.Server
+{
+
+ public static class ServerManager
+ {
+ public static ClientManager g_ClientMgr;
+ public static LogManager g_Log;
+ public static LoginManager g_Login;
+ public static ChatManager g_Chat;
+ public static IOCPNetWork g_SocketMgr;
+ public static GameManager g_Game;
+
+ public static void InitServer(int port)
+ {
+ g_ClientMgr = new ClientManager();
+ g_ClientMgr.Init(45000, 120);
+ g_Log = new LogManager();
+ g_Login = new LoginManager();
+ g_Chat = new ChatManager();
+ //g_SocketMgr = new IOCPNetWork(1024, 1024);
+ g_SocketMgr = new IOCPNetWork(1024, 4096);
+ g_Game = new GameManager();
+
+ g_SocketMgr.Init();
+ g_SocketMgr.Start(new IPEndPoint(IPAddress.Any.Address, port));
+ Console.WriteLine("Succeed!");
+ }
+ }
+}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/NetWork/IOCPNetWork.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/NetWork/IOCPNetWork.cs
new file mode 100644
index 00000000..94b2722e
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/NetWork/IOCPNetWork.cs
@@ -0,0 +1,63 @@
+using HaoYueNet.ServerNetwork;
+using System.Net.Sockets;
+
+namespace AxibugEmuOnline.Server.NetWork
+{
+ public class IOCPNetWork : TcpSaeaServer
+ {
+ public IOCPNetWork(int numConnections, int receiveBufferSize)
+ : base(numConnections, receiveBufferSize)
+ {
+ OnClientNumberChange += ClientNumberChange;
+ OnReceive += ReceiveData;
+ OnDisconnected += OnDisconnect;
+ OnNetLog += OnShowNetLog;
+ }
+
+ private void ClientNumberChange(int num, AsyncUserToken token)
+ {
+ Console.WriteLine("Client数发生变化");
+ }
+
+ ///
+ /// 接受包回调
+ ///
+ /// 协议ID
+ /// 错误编号
+ /// 业务数据
+ private void ReceiveData(AsyncUserToken token, int CMDID, byte[] data)
+ {
+ DataCallBack(token.Socket, CMDID, data);
+ }
+
+ public void DataCallBack(Socket sk, int CMDID, byte[] data)
+ {
+ //ServerManager.g_Log.Debug("收到消息 CMDID =>" + CMDID + " 数据长度=>" + data.Length);
+ try
+ {
+ //抛出网络数据
+ NetMsg.Instance.PostNetMsgEvent(CMDID, sk, data);
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine("逻辑处理错误:" + ex.ToString());
+ }
+ }
+
+ ///
+ /// 断开连接
+ ///
+ ///
+ public void OnDisconnect(AsyncUserToken token)
+ {
+ Console.WriteLine("断开连接");
+ ServerManager.g_ClientMgr.SetClientOfflineForSocket(token.Socket);
+ }
+
+ public void OnShowNetLog(string msg)
+ {
+ ServerManager.g_Log.Debug(msg);
+ }
+
+ }
+}
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/NetWork/NetMsg.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/NetWork/NetMsg.cs
new file mode 100644
index 00000000..3bd94fa2
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/NetWork/NetMsg.cs
@@ -0,0 +1,96 @@
+using System.Net.Sockets;
+
+namespace AxibugEmuOnline.Server.NetWork
+{
+
+ public class NetMsg
+ {
+ private static NetMsg instance = new NetMsg();
+ public static NetMsg Instance { get { return instance; } }
+
+ private Dictionary> netEventDic = new Dictionary>(128);
+
+ private NetMsg() { }
+
+
+ #region RegisterMsgEvent
+
+ public void RegNetMsgEvent(int cmd, Action callback)
+ {
+ InterRegNetMsgEvent(cmd, callback);
+ }
+
+ private void InterRegNetMsgEvent(int cmd, Delegate callback)
+ {
+ if (netEventDic.ContainsKey(cmd))
+ {
+ if (netEventDic[cmd].IndexOf(callback) < 0)
+ {
+ netEventDic[cmd].Add(callback);
+ }
+ }
+ else
+ {
+ netEventDic.Add(cmd, new List() { callback });
+ }
+ }
+ #endregion
+
+ #region UnregisterCMD
+
+ public void UnregisterCMD(int cmd, Action callback)
+ {
+ Delegate tempDelegate = callback;
+ InterUnregisterCMD(cmd, tempDelegate);
+ }
+
+ private void InterUnregisterCMD(int cmd, Delegate callback)
+ {
+ if (netEventDic.ContainsKey(cmd))
+ {
+ netEventDic[cmd].Remove(callback);
+ if (netEventDic[cmd].Count == 0) netEventDic.Remove(cmd);
+ }
+ }
+ #endregion
+
+ #region PostEvent
+ public void PostNetMsgEvent(int cmd, Socket arg1, byte[] arg2)
+ {
+ List eventList = GetNetEventDicList(cmd);
+ if (eventList != null)
+ {
+ foreach (Delegate callback in eventList)
+ {
+ try
+ {
+ ((Action)callback)(arg1, arg2);
+ }
+ catch (Exception e)
+ {
+ ServerManager.g_Log.Error(e.Message);
+ }
+ }
+ }
+ }
+ #endregion
+
+ ///
+ /// 获取所有事件
+ ///
+ ///
+ ///
+ private List GetNetEventDicList(int cmd)
+ {
+ if (netEventDic.ContainsKey(cmd))
+ {
+ List tempList = netEventDic[cmd];
+ if (null != tempList)
+ {
+ return tempList;
+ }
+ }
+ return null;
+ }
+ }
+}
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Program.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Program.cs
new file mode 100644
index 00000000..6d4a1221
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Program.cs
@@ -0,0 +1,17 @@
+namespace AxibugEmuOnline.Server
+{
+ internal class Program
+ {
+ static string Title = "AxibugEmuOnline.Server";
+ static void Main(string[] args)
+ {
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.Title = Title;
+ ServerManager.InitServer(10492);
+ while (true)
+ {
+ Console.ReadLine();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml
new file mode 100644
index 00000000..d37ba189
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml
@@ -0,0 +1,18 @@
+
+
+
+
+ Release
+ Any CPU
+ bin\Release\net8.0\publish\win-x64\
+ FileSystem
+ <_TargetId>Folder
+ net8.0
+ win-x64
+ false
+ false
+ false
+
+
\ No newline at end of file
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml.user b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml.user
new file mode 100644
index 00000000..de2ab1de
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -0,0 +1,10 @@
+
+
+
+
+ True|2024-06-28T08:25:59.3159172Z;True|2024-06-28T15:30:49.8257235+08:00;
+
+
+
\ No newline at end of file
diff --git a/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs
new file mode 100644
index 00000000..b23e13ba
--- /dev/null
+++ b/AxibugEmuOnline.Server/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs
@@ -0,0 +1,1398 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: protobuf_AxibugEmuOnline.proto
+//
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace AxibugProtobuf {
+
+ /// Holder for reflection information generated from protobuf_AxibugEmuOnline.proto
+ public static partial class ProtobufAxibugEmuOnlineReflection {
+
+ #region Descriptor
+ /// File descriptor for protobuf_AxibugEmuOnline.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static ProtobufAxibugEmuOnlineReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Ch5wcm90b2J1Zl9BeGlidWdFbXVPbmxpbmUucHJvdG8SDkF4aWJ1Z1Byb3Rv",
+ "YnVmIiMKEFByb3RvYnVmX0NoYXRNc2cSDwoHQ2hhdE1zZxgBIAEoCSJIChVQ",
+ "cm90b2J1Zl9DaGF0TXNnX1JFU1ASEAoITmlja05hbWUYASABKAkSDwoHQ2hh",
+ "dE1zZxgCIAEoCRIMCgREYXRlGAMgASgDIpEBCg5Qcm90b2J1Zl9Mb2dpbhIs",
+ "Cglsb2dpblR5cGUYASABKA4yGS5BeGlidWdQcm90b2J1Zi5Mb2dpblR5cGUS",
+ "LgoKZGV2aWNlVHlwZRgCIAEoDjIaLkF4aWJ1Z1Byb3RvYnVmLkRldmljZVR5",
+ "cGUSDwoHQWNjb3VudBgDIAEoCRIQCghQYXNzd29yZBgEIAEoCSKMAQoTUHJv",
+ "dG9idWZfTG9naW5fUkVTUBINCgVUb2tlbhgBIAEoCRIVCg1MYXN0TG9naW5E",
+ "YXRlGAIgASgJEg8KB1JlZ0RhdGUYAyABKAkSMQoGU3RhdHVzGAQgASgOMiEu",
+ "QXhpYnVnUHJvdG9idWYuTG9naW5SZXN1bHRTdGF0dXMSCwoDVUlEGAUgASgD",
+ "IjsKFVByb3RvYnVmX1NjcmVubl9GcmFtZRIPCgdGcmFtZUlEGAEgASgFEhEK",
+ "CVJhd0JpdG1hcBgCIAEoDCpOCglDb21tYW5kSUQSDgoKQ01EX0RFRkFVTBAA",
+ "Eg4KCUNNRF9MT0dJThDRDxIQCgtDTURfQ0hBVE1TRxChHxIPCgpDTURfU2Ny",
+ "ZWVuEIknKisKCUVycm9yQ29kZRIQCgxFUlJPUl9ERUZBVUwQABIMCghFUlJP",
+ "Ul9PSxABKhwKCUxvZ2luVHlwZRIPCgtCYXNlRGVmYXVsdBAAKksKCkRldmlj",
+ "ZVR5cGUSFgoSRGV2aWNlVHlwZV9EZWZhdWx0EAASBgoCUEMQARILCgdBbmRy",
+ "b2lkEAISBwoDSU9TEAMSBwoDUFNWEAQqTgoRTG9naW5SZXN1bHRTdGF0dXMS",
+ "IQodTG9naW5SZXN1bHRTdGF0dXNfQmFzZURlZmF1bHQQABIGCgJPSxABEg4K",
+ "CkFjY291bnRFcnIQAkICSAFiBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg), global::AxibugProtobuf.Protobuf_ChatMsg.Parser, new[]{ "ChatMsg" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg_RESP), global::AxibugProtobuf.Protobuf_ChatMsg_RESP.Parser, new[]{ "NickName", "ChatMsg", "Date" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Login), global::AxibugProtobuf.Protobuf_Login.Parser, new[]{ "LoginType", "DeviceType", "Account", "Password" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Login_RESP), global::AxibugProtobuf.Protobuf_Login_RESP.Parser, new[]{ "Token", "LastLoginDate", "RegDate", "Status", "UID" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Screnn_Frame), global::AxibugProtobuf.Protobuf_Screnn_Frame.Parser, new[]{ "FrameID", "RawBitmap" }, null, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum CommandID {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("CMD_DEFAUL")] CmdDefaul = 0,
+ ///
+ ///自动登录上行 | 下行 对应 Protobuf_Login | Protobuf_Login_RESP
+ ///
+ [pbr::OriginalName("CMD_LOGIN")] CmdLogin = 2001,
+ ///
+ ///广播信息上行 | 下行 对应 Protobuf_ChatMsg | Protobuf_ChatMsg_RESP
+ ///
+ [pbr::OriginalName("CMD_CHATMSG")] CmdChatmsg = 4001,
+ ///
+ ///画面同步 | 同步广播 对应 Protobuf_Screnn_Frame
+ ///
+ [pbr::OriginalName("CMD_Screen")] CmdScreen = 5001,
+ }
+
+ public enum ErrorCode {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("ERROR_DEFAUL")] ErrorDefaul = 0,
+ ///
+ ///成功
+ ///
+ [pbr::OriginalName("ERROR_OK")] ErrorOk = 1,
+ }
+
+ public enum LoginType {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("BaseDefault")] BaseDefault = 0,
+ }
+
+ public enum DeviceType {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("DeviceType_Default")] Default = 0,
+ [pbr::OriginalName("PC")] Pc = 1,
+ [pbr::OriginalName("Android")] Android = 2,
+ [pbr::OriginalName("IOS")] Ios = 3,
+ [pbr::OriginalName("PSV")] Psv = 4,
+ }
+
+ public enum LoginResultStatus {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("LoginResultStatus_BaseDefault")] BaseDefault = 0,
+ [pbr::OriginalName("OK")] Ok = 1,
+ [pbr::OriginalName("AccountErr")] AccountErr = 2,
+ }
+
+ #endregion
+
+ #region Messages
+ ///
+ ///聊天 上行
+ ///
+ public sealed partial class Protobuf_ChatMsg : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_ChatMsg());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_ChatMsg() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_ChatMsg(Protobuf_ChatMsg other) : this() {
+ chatMsg_ = other.chatMsg_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_ChatMsg Clone() {
+ return new Protobuf_ChatMsg(this);
+ }
+
+ /// Field number for the "ChatMsg" field.
+ public const int ChatMsgFieldNumber = 1;
+ private string chatMsg_ = "";
+ ///
+ ///消息
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string ChatMsg {
+ get { return chatMsg_; }
+ set {
+ chatMsg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_ChatMsg);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_ChatMsg other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (ChatMsg != other.ChatMsg) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (ChatMsg.Length != 0) hash ^= ChatMsg.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (ChatMsg.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(ChatMsg);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (ChatMsg.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(ChatMsg);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (ChatMsg.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(ChatMsg);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_ChatMsg other) {
+ if (other == null) {
+ return;
+ }
+ if (other.ChatMsg.Length != 0) {
+ ChatMsg = other.ChatMsg;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ ChatMsg = input.ReadString();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ ChatMsg = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ ///聊天 下行
+ ///
+ public sealed partial class Protobuf_ChatMsg_RESP : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_ChatMsg_RESP());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_ChatMsg_RESP() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_ChatMsg_RESP(Protobuf_ChatMsg_RESP other) : this() {
+ nickName_ = other.nickName_;
+ chatMsg_ = other.chatMsg_;
+ date_ = other.date_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_ChatMsg_RESP Clone() {
+ return new Protobuf_ChatMsg_RESP(this);
+ }
+
+ /// Field number for the "NickName" field.
+ public const int NickNameFieldNumber = 1;
+ private string nickName_ = "";
+ ///
+ ///昵称
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string NickName {
+ get { return nickName_; }
+ set {
+ nickName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "ChatMsg" field.
+ public const int ChatMsgFieldNumber = 2;
+ private string chatMsg_ = "";
+ ///
+ ///消息
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string ChatMsg {
+ get { return chatMsg_; }
+ set {
+ chatMsg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "Date" field.
+ public const int DateFieldNumber = 3;
+ private long date_;
+ ///
+ ///时间
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long Date {
+ get { return date_; }
+ set {
+ date_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_ChatMsg_RESP);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_ChatMsg_RESP other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (NickName != other.NickName) return false;
+ if (ChatMsg != other.ChatMsg) return false;
+ if (Date != other.Date) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (NickName.Length != 0) hash ^= NickName.GetHashCode();
+ if (ChatMsg.Length != 0) hash ^= ChatMsg.GetHashCode();
+ if (Date != 0L) hash ^= Date.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (NickName.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(NickName);
+ }
+ if (ChatMsg.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(ChatMsg);
+ }
+ if (Date != 0L) {
+ output.WriteRawTag(24);
+ output.WriteInt64(Date);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (NickName.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(NickName);
+ }
+ if (ChatMsg.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(ChatMsg);
+ }
+ if (Date != 0L) {
+ output.WriteRawTag(24);
+ output.WriteInt64(Date);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (NickName.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(NickName);
+ }
+ if (ChatMsg.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(ChatMsg);
+ }
+ if (Date != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Date);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_ChatMsg_RESP other) {
+ if (other == null) {
+ return;
+ }
+ if (other.NickName.Length != 0) {
+ NickName = other.NickName;
+ }
+ if (other.ChatMsg.Length != 0) {
+ ChatMsg = other.ChatMsg;
+ }
+ if (other.Date != 0L) {
+ Date = other.Date;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ NickName = input.ReadString();
+ break;
+ }
+ case 18: {
+ ChatMsg = input.ReadString();
+ break;
+ }
+ case 24: {
+ Date = input.ReadInt64();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ NickName = input.ReadString();
+ break;
+ }
+ case 18: {
+ ChatMsg = input.ReadString();
+ break;
+ }
+ case 24: {
+ Date = input.ReadInt64();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ ///登录数据上行
+ ///
+ public sealed partial class Protobuf_Login : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Login());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[2]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Login() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Login(Protobuf_Login other) : this() {
+ loginType_ = other.loginType_;
+ deviceType_ = other.deviceType_;
+ account_ = other.account_;
+ password_ = other.password_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Login Clone() {
+ return new Protobuf_Login(this);
+ }
+
+ /// Field number for the "loginType" field.
+ public const int LoginTypeFieldNumber = 1;
+ private global::AxibugProtobuf.LoginType loginType_ = global::AxibugProtobuf.LoginType.BaseDefault;
+ ///
+ ///登录操作类型 [0]皓月通行证 [3] 皓月BF3 [4] 皓月BF4
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AxibugProtobuf.LoginType LoginType {
+ get { return loginType_; }
+ set {
+ loginType_ = value;
+ }
+ }
+
+ /// Field number for the "deviceType" field.
+ public const int DeviceTypeFieldNumber = 2;
+ private global::AxibugProtobuf.DeviceType deviceType_ = global::AxibugProtobuf.DeviceType.Default;
+ ///
+ ///设备类型 [0]PC [1]AndroidPad预留 [3]IPad预留
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AxibugProtobuf.DeviceType DeviceType {
+ get { return deviceType_; }
+ set {
+ deviceType_ = value;
+ }
+ }
+
+ /// Field number for the "Account" field.
+ public const int AccountFieldNumber = 3;
+ private string account_ = "";
+ ///
+ ///用户名
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Account {
+ get { return account_; }
+ set {
+ account_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "Password" field.
+ public const int PasswordFieldNumber = 4;
+ private string password_ = "";
+ ///
+ ///密码
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Password {
+ get { return password_; }
+ set {
+ password_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_Login);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_Login other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (LoginType != other.LoginType) return false;
+ if (DeviceType != other.DeviceType) return false;
+ if (Account != other.Account) return false;
+ if (Password != other.Password) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (LoginType != global::AxibugProtobuf.LoginType.BaseDefault) hash ^= LoginType.GetHashCode();
+ if (DeviceType != global::AxibugProtobuf.DeviceType.Default) hash ^= DeviceType.GetHashCode();
+ if (Account.Length != 0) hash ^= Account.GetHashCode();
+ if (Password.Length != 0) hash ^= Password.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (LoginType != global::AxibugProtobuf.LoginType.BaseDefault) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) LoginType);
+ }
+ if (DeviceType != global::AxibugProtobuf.DeviceType.Default) {
+ output.WriteRawTag(16);
+ output.WriteEnum((int) DeviceType);
+ }
+ if (Account.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(Account);
+ }
+ if (Password.Length != 0) {
+ output.WriteRawTag(34);
+ output.WriteString(Password);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (LoginType != global::AxibugProtobuf.LoginType.BaseDefault) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) LoginType);
+ }
+ if (DeviceType != global::AxibugProtobuf.DeviceType.Default) {
+ output.WriteRawTag(16);
+ output.WriteEnum((int) DeviceType);
+ }
+ if (Account.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(Account);
+ }
+ if (Password.Length != 0) {
+ output.WriteRawTag(34);
+ output.WriteString(Password);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (LoginType != global::AxibugProtobuf.LoginType.BaseDefault) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) LoginType);
+ }
+ if (DeviceType != global::AxibugProtobuf.DeviceType.Default) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DeviceType);
+ }
+ if (Account.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Account);
+ }
+ if (Password.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Password);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_Login other) {
+ if (other == null) {
+ return;
+ }
+ if (other.LoginType != global::AxibugProtobuf.LoginType.BaseDefault) {
+ LoginType = other.LoginType;
+ }
+ if (other.DeviceType != global::AxibugProtobuf.DeviceType.Default) {
+ DeviceType = other.DeviceType;
+ }
+ if (other.Account.Length != 0) {
+ Account = other.Account;
+ }
+ if (other.Password.Length != 0) {
+ Password = other.Password;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ LoginType = (global::AxibugProtobuf.LoginType) input.ReadEnum();
+ break;
+ }
+ case 16: {
+ DeviceType = (global::AxibugProtobuf.DeviceType) input.ReadEnum();
+ break;
+ }
+ case 26: {
+ Account = input.ReadString();
+ break;
+ }
+ case 34: {
+ Password = input.ReadString();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 8: {
+ LoginType = (global::AxibugProtobuf.LoginType) input.ReadEnum();
+ break;
+ }
+ case 16: {
+ DeviceType = (global::AxibugProtobuf.DeviceType) input.ReadEnum();
+ break;
+ }
+ case 26: {
+ Account = input.ReadString();
+ break;
+ }
+ case 34: {
+ Password = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ ///登录数据下行
+ ///
+ public sealed partial class Protobuf_Login_RESP : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Login_RESP());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[3]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Login_RESP() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Login_RESP(Protobuf_Login_RESP other) : this() {
+ token_ = other.token_;
+ lastLoginDate_ = other.lastLoginDate_;
+ regDate_ = other.regDate_;
+ status_ = other.status_;
+ uID_ = other.uID_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Login_RESP Clone() {
+ return new Protobuf_Login_RESP(this);
+ }
+
+ /// Field number for the "Token" field.
+ public const int TokenFieldNumber = 1;
+ private string token_ = "";
+ ///
+ ///登录凭据 (本次登录之后,所有业务请求凭据,需要存储在内存中)
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Token {
+ get { return token_; }
+ set {
+ token_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "LastLoginDate" field.
+ public const int LastLoginDateFieldNumber = 2;
+ private string lastLoginDate_ = "";
+ ///
+ ///上次登录时间(只用于呈现的字符串,若界面需求需要)
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string LastLoginDate {
+ get { return lastLoginDate_; }
+ set {
+ lastLoginDate_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "RegDate" field.
+ public const int RegDateFieldNumber = 3;
+ private string regDate_ = "";
+ ///
+ ///注册时间(只用于呈现的字符串,若界面需求需要)
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string RegDate {
+ get { return regDate_; }
+ set {
+ regDate_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "Status" field.
+ public const int StatusFieldNumber = 4;
+ private global::AxibugProtobuf.LoginResultStatus status_ = global::AxibugProtobuf.LoginResultStatus.BaseDefault;
+ ///
+ ///账号状态 (预留) [1]正常[0]被禁封
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AxibugProtobuf.LoginResultStatus Status {
+ get { return status_; }
+ set {
+ status_ = value;
+ }
+ }
+
+ /// Field number for the "UID" field.
+ public const int UIDFieldNumber = 5;
+ private long uID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long UID {
+ get { return uID_; }
+ set {
+ uID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_Login_RESP);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_Login_RESP other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Token != other.Token) return false;
+ if (LastLoginDate != other.LastLoginDate) return false;
+ if (RegDate != other.RegDate) return false;
+ if (Status != other.Status) return false;
+ if (UID != other.UID) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Token.Length != 0) hash ^= Token.GetHashCode();
+ if (LastLoginDate.Length != 0) hash ^= LastLoginDate.GetHashCode();
+ if (RegDate.Length != 0) hash ^= RegDate.GetHashCode();
+ if (Status != global::AxibugProtobuf.LoginResultStatus.BaseDefault) hash ^= Status.GetHashCode();
+ if (UID != 0L) hash ^= UID.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (Token.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Token);
+ }
+ if (LastLoginDate.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(LastLoginDate);
+ }
+ if (RegDate.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(RegDate);
+ }
+ if (Status != global::AxibugProtobuf.LoginResultStatus.BaseDefault) {
+ output.WriteRawTag(32);
+ output.WriteEnum((int) Status);
+ }
+ if (UID != 0L) {
+ output.WriteRawTag(40);
+ output.WriteInt64(UID);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (Token.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Token);
+ }
+ if (LastLoginDate.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(LastLoginDate);
+ }
+ if (RegDate.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(RegDate);
+ }
+ if (Status != global::AxibugProtobuf.LoginResultStatus.BaseDefault) {
+ output.WriteRawTag(32);
+ output.WriteEnum((int) Status);
+ }
+ if (UID != 0L) {
+ output.WriteRawTag(40);
+ output.WriteInt64(UID);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (Token.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Token);
+ }
+ if (LastLoginDate.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(LastLoginDate);
+ }
+ if (RegDate.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(RegDate);
+ }
+ if (Status != global::AxibugProtobuf.LoginResultStatus.BaseDefault) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
+ }
+ if (UID != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(UID);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_Login_RESP other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Token.Length != 0) {
+ Token = other.Token;
+ }
+ if (other.LastLoginDate.Length != 0) {
+ LastLoginDate = other.LastLoginDate;
+ }
+ if (other.RegDate.Length != 0) {
+ RegDate = other.RegDate;
+ }
+ if (other.Status != global::AxibugProtobuf.LoginResultStatus.BaseDefault) {
+ Status = other.Status;
+ }
+ if (other.UID != 0L) {
+ UID = other.UID;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ Token = input.ReadString();
+ break;
+ }
+ case 18: {
+ LastLoginDate = input.ReadString();
+ break;
+ }
+ case 26: {
+ RegDate = input.ReadString();
+ break;
+ }
+ case 32: {
+ Status = (global::AxibugProtobuf.LoginResultStatus) input.ReadEnum();
+ break;
+ }
+ case 40: {
+ UID = input.ReadInt64();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ Token = input.ReadString();
+ break;
+ }
+ case 18: {
+ LastLoginDate = input.ReadString();
+ break;
+ }
+ case 26: {
+ RegDate = input.ReadString();
+ break;
+ }
+ case 32: {
+ Status = (global::AxibugProtobuf.LoginResultStatus) input.ReadEnum();
+ break;
+ }
+ case 40: {
+ UID = input.ReadInt64();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class Protobuf_Screnn_Frame : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Screnn_Frame());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[4]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Screnn_Frame() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Screnn_Frame(Protobuf_Screnn_Frame other) : this() {
+ frameID_ = other.frameID_;
+ rawBitmap_ = other.rawBitmap_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Screnn_Frame Clone() {
+ return new Protobuf_Screnn_Frame(this);
+ }
+
+ /// Field number for the "FrameID" field.
+ public const int FrameIDFieldNumber = 1;
+ private int frameID_;
+ ///
+ ///帧编号
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FrameID {
+ get { return frameID_; }
+ set {
+ frameID_ = value;
+ }
+ }
+
+ /// Field number for the "RawBitmap" field.
+ public const int RawBitmapFieldNumber = 2;
+ private pb::ByteString rawBitmap_ = pb::ByteString.Empty;
+ ///
+ ///渲染层画面
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString RawBitmap {
+ get { return rawBitmap_; }
+ set {
+ rawBitmap_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_Screnn_Frame);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_Screnn_Frame other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (FrameID != other.FrameID) return false;
+ if (RawBitmap != other.RawBitmap) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (FrameID != 0) hash ^= FrameID.GetHashCode();
+ if (RawBitmap.Length != 0) hash ^= RawBitmap.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (FrameID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(FrameID);
+ }
+ if (RawBitmap.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(RawBitmap);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (FrameID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(FrameID);
+ }
+ if (RawBitmap.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(RawBitmap);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (FrameID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(FrameID);
+ }
+ if (RawBitmap.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(RawBitmap);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_Screnn_Frame other) {
+ if (other == null) {
+ return;
+ }
+ if (other.FrameID != 0) {
+ FrameID = other.FrameID;
+ }
+ if (other.RawBitmap.Length != 0) {
+ RawBitmap = other.RawBitmap;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ FrameID = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ RawBitmap = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 8: {
+ FrameID = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ RawBitmap = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Lib/Google.Protobuf.dll b/Lib/Google.Protobuf.dll
new file mode 100644
index 00000000..7663c313
Binary files /dev/null and b/Lib/Google.Protobuf.dll differ
diff --git a/Lib/HaoYueNet.ServerNetwork.dll b/Lib/HaoYueNet.ServerNetwork.dll
new file mode 100644
index 00000000..fe16f7e2
Binary files /dev/null and b/Lib/HaoYueNet.ServerNetwork.dll differ
diff --git a/ProtobufCore/build_cs.bat b/ProtobufCore/build_cs.bat
new file mode 100644
index 00000000..a8e3673b
--- /dev/null
+++ b/ProtobufCore/build_cs.bat
@@ -0,0 +1,16 @@
+@echo off
+
+set "PROTOC_EXE=%cd%\protoc.exe"
+set "WORK_DIR=%cd%\proto"
+set "CS_OUT_PATH=%cd%\out\CS"
+
+echo "==>>buildStart"
+for /f "delims=" %%i in ('dir /b proto "proto/*.proto"') do (
+ echo build file:%%%i
+ %PROTOC_EXE% --proto_path="%WORK_DIR%" --csharp_out="%CS_OUT_PATH%" "%WORK_DIR%\%%i"
+)
+echo "==>>build finish"
+echo "==>>copy cs"
+
+::copy %cd%\out\CS\ ..\AxibugEmuOnline.Server\AxibugEmuOnline.Server\Protobuf
+pause
\ No newline at end of file
diff --git a/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs b/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs
new file mode 100644
index 00000000..b23e13ba
--- /dev/null
+++ b/ProtobufCore/out/CS/ProtobufAxibugEmuOnline.cs
@@ -0,0 +1,1398 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: protobuf_AxibugEmuOnline.proto
+//
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace AxibugProtobuf {
+
+ /// Holder for reflection information generated from protobuf_AxibugEmuOnline.proto
+ public static partial class ProtobufAxibugEmuOnlineReflection {
+
+ #region Descriptor
+ /// File descriptor for protobuf_AxibugEmuOnline.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static ProtobufAxibugEmuOnlineReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Ch5wcm90b2J1Zl9BeGlidWdFbXVPbmxpbmUucHJvdG8SDkF4aWJ1Z1Byb3Rv",
+ "YnVmIiMKEFByb3RvYnVmX0NoYXRNc2cSDwoHQ2hhdE1zZxgBIAEoCSJIChVQ",
+ "cm90b2J1Zl9DaGF0TXNnX1JFU1ASEAoITmlja05hbWUYASABKAkSDwoHQ2hh",
+ "dE1zZxgCIAEoCRIMCgREYXRlGAMgASgDIpEBCg5Qcm90b2J1Zl9Mb2dpbhIs",
+ "Cglsb2dpblR5cGUYASABKA4yGS5BeGlidWdQcm90b2J1Zi5Mb2dpblR5cGUS",
+ "LgoKZGV2aWNlVHlwZRgCIAEoDjIaLkF4aWJ1Z1Byb3RvYnVmLkRldmljZVR5",
+ "cGUSDwoHQWNjb3VudBgDIAEoCRIQCghQYXNzd29yZBgEIAEoCSKMAQoTUHJv",
+ "dG9idWZfTG9naW5fUkVTUBINCgVUb2tlbhgBIAEoCRIVCg1MYXN0TG9naW5E",
+ "YXRlGAIgASgJEg8KB1JlZ0RhdGUYAyABKAkSMQoGU3RhdHVzGAQgASgOMiEu",
+ "QXhpYnVnUHJvdG9idWYuTG9naW5SZXN1bHRTdGF0dXMSCwoDVUlEGAUgASgD",
+ "IjsKFVByb3RvYnVmX1NjcmVubl9GcmFtZRIPCgdGcmFtZUlEGAEgASgFEhEK",
+ "CVJhd0JpdG1hcBgCIAEoDCpOCglDb21tYW5kSUQSDgoKQ01EX0RFRkFVTBAA",
+ "Eg4KCUNNRF9MT0dJThDRDxIQCgtDTURfQ0hBVE1TRxChHxIPCgpDTURfU2Ny",
+ "ZWVuEIknKisKCUVycm9yQ29kZRIQCgxFUlJPUl9ERUZBVUwQABIMCghFUlJP",
+ "Ul9PSxABKhwKCUxvZ2luVHlwZRIPCgtCYXNlRGVmYXVsdBAAKksKCkRldmlj",
+ "ZVR5cGUSFgoSRGV2aWNlVHlwZV9EZWZhdWx0EAASBgoCUEMQARILCgdBbmRy",
+ "b2lkEAISBwoDSU9TEAMSBwoDUFNWEAQqTgoRTG9naW5SZXN1bHRTdGF0dXMS",
+ "IQodTG9naW5SZXN1bHRTdGF0dXNfQmFzZURlZmF1bHQQABIGCgJPSxABEg4K",
+ "CkFjY291bnRFcnIQAkICSAFiBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg), global::AxibugProtobuf.Protobuf_ChatMsg.Parser, new[]{ "ChatMsg" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg_RESP), global::AxibugProtobuf.Protobuf_ChatMsg_RESP.Parser, new[]{ "NickName", "ChatMsg", "Date" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Login), global::AxibugProtobuf.Protobuf_Login.Parser, new[]{ "LoginType", "DeviceType", "Account", "Password" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Login_RESP), global::AxibugProtobuf.Protobuf_Login_RESP.Parser, new[]{ "Token", "LastLoginDate", "RegDate", "Status", "UID" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Screnn_Frame), global::AxibugProtobuf.Protobuf_Screnn_Frame.Parser, new[]{ "FrameID", "RawBitmap" }, null, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum CommandID {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("CMD_DEFAUL")] CmdDefaul = 0,
+ ///
+ ///自动登录上行 | 下行 对应 Protobuf_Login | Protobuf_Login_RESP
+ ///
+ [pbr::OriginalName("CMD_LOGIN")] CmdLogin = 2001,
+ ///
+ ///广播信息上行 | 下行 对应 Protobuf_ChatMsg | Protobuf_ChatMsg_RESP
+ ///
+ [pbr::OriginalName("CMD_CHATMSG")] CmdChatmsg = 4001,
+ ///
+ ///画面同步 | 同步广播 对应 Protobuf_Screnn_Frame
+ ///
+ [pbr::OriginalName("CMD_Screen")] CmdScreen = 5001,
+ }
+
+ public enum ErrorCode {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("ERROR_DEFAUL")] ErrorDefaul = 0,
+ ///
+ ///成功
+ ///
+ [pbr::OriginalName("ERROR_OK")] ErrorOk = 1,
+ }
+
+ public enum LoginType {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("BaseDefault")] BaseDefault = 0,
+ }
+
+ public enum DeviceType {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("DeviceType_Default")] Default = 0,
+ [pbr::OriginalName("PC")] Pc = 1,
+ [pbr::OriginalName("Android")] Android = 2,
+ [pbr::OriginalName("IOS")] Ios = 3,
+ [pbr::OriginalName("PSV")] Psv = 4,
+ }
+
+ public enum LoginResultStatus {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("LoginResultStatus_BaseDefault")] BaseDefault = 0,
+ [pbr::OriginalName("OK")] Ok = 1,
+ [pbr::OriginalName("AccountErr")] AccountErr = 2,
+ }
+
+ #endregion
+
+ #region Messages
+ ///
+ ///聊天 上行
+ ///
+ public sealed partial class Protobuf_ChatMsg : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_ChatMsg());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_ChatMsg() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_ChatMsg(Protobuf_ChatMsg other) : this() {
+ chatMsg_ = other.chatMsg_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_ChatMsg Clone() {
+ return new Protobuf_ChatMsg(this);
+ }
+
+ /// Field number for the "ChatMsg" field.
+ public const int ChatMsgFieldNumber = 1;
+ private string chatMsg_ = "";
+ ///
+ ///消息
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string ChatMsg {
+ get { return chatMsg_; }
+ set {
+ chatMsg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_ChatMsg);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_ChatMsg other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (ChatMsg != other.ChatMsg) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (ChatMsg.Length != 0) hash ^= ChatMsg.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (ChatMsg.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(ChatMsg);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (ChatMsg.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(ChatMsg);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (ChatMsg.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(ChatMsg);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_ChatMsg other) {
+ if (other == null) {
+ return;
+ }
+ if (other.ChatMsg.Length != 0) {
+ ChatMsg = other.ChatMsg;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ ChatMsg = input.ReadString();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ ChatMsg = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ ///聊天 下行
+ ///
+ public sealed partial class Protobuf_ChatMsg_RESP : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_ChatMsg_RESP());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_ChatMsg_RESP() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_ChatMsg_RESP(Protobuf_ChatMsg_RESP other) : this() {
+ nickName_ = other.nickName_;
+ chatMsg_ = other.chatMsg_;
+ date_ = other.date_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_ChatMsg_RESP Clone() {
+ return new Protobuf_ChatMsg_RESP(this);
+ }
+
+ /// Field number for the "NickName" field.
+ public const int NickNameFieldNumber = 1;
+ private string nickName_ = "";
+ ///
+ ///昵称
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string NickName {
+ get { return nickName_; }
+ set {
+ nickName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "ChatMsg" field.
+ public const int ChatMsgFieldNumber = 2;
+ private string chatMsg_ = "";
+ ///
+ ///消息
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string ChatMsg {
+ get { return chatMsg_; }
+ set {
+ chatMsg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "Date" field.
+ public const int DateFieldNumber = 3;
+ private long date_;
+ ///
+ ///时间
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long Date {
+ get { return date_; }
+ set {
+ date_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_ChatMsg_RESP);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_ChatMsg_RESP other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (NickName != other.NickName) return false;
+ if (ChatMsg != other.ChatMsg) return false;
+ if (Date != other.Date) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (NickName.Length != 0) hash ^= NickName.GetHashCode();
+ if (ChatMsg.Length != 0) hash ^= ChatMsg.GetHashCode();
+ if (Date != 0L) hash ^= Date.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (NickName.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(NickName);
+ }
+ if (ChatMsg.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(ChatMsg);
+ }
+ if (Date != 0L) {
+ output.WriteRawTag(24);
+ output.WriteInt64(Date);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (NickName.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(NickName);
+ }
+ if (ChatMsg.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(ChatMsg);
+ }
+ if (Date != 0L) {
+ output.WriteRawTag(24);
+ output.WriteInt64(Date);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (NickName.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(NickName);
+ }
+ if (ChatMsg.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(ChatMsg);
+ }
+ if (Date != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Date);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_ChatMsg_RESP other) {
+ if (other == null) {
+ return;
+ }
+ if (other.NickName.Length != 0) {
+ NickName = other.NickName;
+ }
+ if (other.ChatMsg.Length != 0) {
+ ChatMsg = other.ChatMsg;
+ }
+ if (other.Date != 0L) {
+ Date = other.Date;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ NickName = input.ReadString();
+ break;
+ }
+ case 18: {
+ ChatMsg = input.ReadString();
+ break;
+ }
+ case 24: {
+ Date = input.ReadInt64();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ NickName = input.ReadString();
+ break;
+ }
+ case 18: {
+ ChatMsg = input.ReadString();
+ break;
+ }
+ case 24: {
+ Date = input.ReadInt64();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ ///登录数据上行
+ ///
+ public sealed partial class Protobuf_Login : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Login());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[2]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Login() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Login(Protobuf_Login other) : this() {
+ loginType_ = other.loginType_;
+ deviceType_ = other.deviceType_;
+ account_ = other.account_;
+ password_ = other.password_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Login Clone() {
+ return new Protobuf_Login(this);
+ }
+
+ /// Field number for the "loginType" field.
+ public const int LoginTypeFieldNumber = 1;
+ private global::AxibugProtobuf.LoginType loginType_ = global::AxibugProtobuf.LoginType.BaseDefault;
+ ///
+ ///登录操作类型 [0]皓月通行证 [3] 皓月BF3 [4] 皓月BF4
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AxibugProtobuf.LoginType LoginType {
+ get { return loginType_; }
+ set {
+ loginType_ = value;
+ }
+ }
+
+ /// Field number for the "deviceType" field.
+ public const int DeviceTypeFieldNumber = 2;
+ private global::AxibugProtobuf.DeviceType deviceType_ = global::AxibugProtobuf.DeviceType.Default;
+ ///
+ ///设备类型 [0]PC [1]AndroidPad预留 [3]IPad预留
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AxibugProtobuf.DeviceType DeviceType {
+ get { return deviceType_; }
+ set {
+ deviceType_ = value;
+ }
+ }
+
+ /// Field number for the "Account" field.
+ public const int AccountFieldNumber = 3;
+ private string account_ = "";
+ ///
+ ///用户名
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Account {
+ get { return account_; }
+ set {
+ account_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "Password" field.
+ public const int PasswordFieldNumber = 4;
+ private string password_ = "";
+ ///
+ ///密码
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Password {
+ get { return password_; }
+ set {
+ password_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_Login);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_Login other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (LoginType != other.LoginType) return false;
+ if (DeviceType != other.DeviceType) return false;
+ if (Account != other.Account) return false;
+ if (Password != other.Password) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (LoginType != global::AxibugProtobuf.LoginType.BaseDefault) hash ^= LoginType.GetHashCode();
+ if (DeviceType != global::AxibugProtobuf.DeviceType.Default) hash ^= DeviceType.GetHashCode();
+ if (Account.Length != 0) hash ^= Account.GetHashCode();
+ if (Password.Length != 0) hash ^= Password.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (LoginType != global::AxibugProtobuf.LoginType.BaseDefault) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) LoginType);
+ }
+ if (DeviceType != global::AxibugProtobuf.DeviceType.Default) {
+ output.WriteRawTag(16);
+ output.WriteEnum((int) DeviceType);
+ }
+ if (Account.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(Account);
+ }
+ if (Password.Length != 0) {
+ output.WriteRawTag(34);
+ output.WriteString(Password);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (LoginType != global::AxibugProtobuf.LoginType.BaseDefault) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) LoginType);
+ }
+ if (DeviceType != global::AxibugProtobuf.DeviceType.Default) {
+ output.WriteRawTag(16);
+ output.WriteEnum((int) DeviceType);
+ }
+ if (Account.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(Account);
+ }
+ if (Password.Length != 0) {
+ output.WriteRawTag(34);
+ output.WriteString(Password);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (LoginType != global::AxibugProtobuf.LoginType.BaseDefault) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) LoginType);
+ }
+ if (DeviceType != global::AxibugProtobuf.DeviceType.Default) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DeviceType);
+ }
+ if (Account.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Account);
+ }
+ if (Password.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Password);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_Login other) {
+ if (other == null) {
+ return;
+ }
+ if (other.LoginType != global::AxibugProtobuf.LoginType.BaseDefault) {
+ LoginType = other.LoginType;
+ }
+ if (other.DeviceType != global::AxibugProtobuf.DeviceType.Default) {
+ DeviceType = other.DeviceType;
+ }
+ if (other.Account.Length != 0) {
+ Account = other.Account;
+ }
+ if (other.Password.Length != 0) {
+ Password = other.Password;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ LoginType = (global::AxibugProtobuf.LoginType) input.ReadEnum();
+ break;
+ }
+ case 16: {
+ DeviceType = (global::AxibugProtobuf.DeviceType) input.ReadEnum();
+ break;
+ }
+ case 26: {
+ Account = input.ReadString();
+ break;
+ }
+ case 34: {
+ Password = input.ReadString();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 8: {
+ LoginType = (global::AxibugProtobuf.LoginType) input.ReadEnum();
+ break;
+ }
+ case 16: {
+ DeviceType = (global::AxibugProtobuf.DeviceType) input.ReadEnum();
+ break;
+ }
+ case 26: {
+ Account = input.ReadString();
+ break;
+ }
+ case 34: {
+ Password = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ ///登录数据下行
+ ///
+ public sealed partial class Protobuf_Login_RESP : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Login_RESP());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[3]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Login_RESP() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Login_RESP(Protobuf_Login_RESP other) : this() {
+ token_ = other.token_;
+ lastLoginDate_ = other.lastLoginDate_;
+ regDate_ = other.regDate_;
+ status_ = other.status_;
+ uID_ = other.uID_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Login_RESP Clone() {
+ return new Protobuf_Login_RESP(this);
+ }
+
+ /// Field number for the "Token" field.
+ public const int TokenFieldNumber = 1;
+ private string token_ = "";
+ ///
+ ///登录凭据 (本次登录之后,所有业务请求凭据,需要存储在内存中)
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Token {
+ get { return token_; }
+ set {
+ token_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "LastLoginDate" field.
+ public const int LastLoginDateFieldNumber = 2;
+ private string lastLoginDate_ = "";
+ ///
+ ///上次登录时间(只用于呈现的字符串,若界面需求需要)
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string LastLoginDate {
+ get { return lastLoginDate_; }
+ set {
+ lastLoginDate_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "RegDate" field.
+ public const int RegDateFieldNumber = 3;
+ private string regDate_ = "";
+ ///
+ ///注册时间(只用于呈现的字符串,若界面需求需要)
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string RegDate {
+ get { return regDate_; }
+ set {
+ regDate_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "Status" field.
+ public const int StatusFieldNumber = 4;
+ private global::AxibugProtobuf.LoginResultStatus status_ = global::AxibugProtobuf.LoginResultStatus.BaseDefault;
+ ///
+ ///账号状态 (预留) [1]正常[0]被禁封
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AxibugProtobuf.LoginResultStatus Status {
+ get { return status_; }
+ set {
+ status_ = value;
+ }
+ }
+
+ /// Field number for the "UID" field.
+ public const int UIDFieldNumber = 5;
+ private long uID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long UID {
+ get { return uID_; }
+ set {
+ uID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_Login_RESP);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_Login_RESP other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Token != other.Token) return false;
+ if (LastLoginDate != other.LastLoginDate) return false;
+ if (RegDate != other.RegDate) return false;
+ if (Status != other.Status) return false;
+ if (UID != other.UID) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Token.Length != 0) hash ^= Token.GetHashCode();
+ if (LastLoginDate.Length != 0) hash ^= LastLoginDate.GetHashCode();
+ if (RegDate.Length != 0) hash ^= RegDate.GetHashCode();
+ if (Status != global::AxibugProtobuf.LoginResultStatus.BaseDefault) hash ^= Status.GetHashCode();
+ if (UID != 0L) hash ^= UID.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (Token.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Token);
+ }
+ if (LastLoginDate.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(LastLoginDate);
+ }
+ if (RegDate.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(RegDate);
+ }
+ if (Status != global::AxibugProtobuf.LoginResultStatus.BaseDefault) {
+ output.WriteRawTag(32);
+ output.WriteEnum((int) Status);
+ }
+ if (UID != 0L) {
+ output.WriteRawTag(40);
+ output.WriteInt64(UID);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (Token.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Token);
+ }
+ if (LastLoginDate.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(LastLoginDate);
+ }
+ if (RegDate.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(RegDate);
+ }
+ if (Status != global::AxibugProtobuf.LoginResultStatus.BaseDefault) {
+ output.WriteRawTag(32);
+ output.WriteEnum((int) Status);
+ }
+ if (UID != 0L) {
+ output.WriteRawTag(40);
+ output.WriteInt64(UID);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (Token.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Token);
+ }
+ if (LastLoginDate.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(LastLoginDate);
+ }
+ if (RegDate.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(RegDate);
+ }
+ if (Status != global::AxibugProtobuf.LoginResultStatus.BaseDefault) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
+ }
+ if (UID != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(UID);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_Login_RESP other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Token.Length != 0) {
+ Token = other.Token;
+ }
+ if (other.LastLoginDate.Length != 0) {
+ LastLoginDate = other.LastLoginDate;
+ }
+ if (other.RegDate.Length != 0) {
+ RegDate = other.RegDate;
+ }
+ if (other.Status != global::AxibugProtobuf.LoginResultStatus.BaseDefault) {
+ Status = other.Status;
+ }
+ if (other.UID != 0L) {
+ UID = other.UID;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ Token = input.ReadString();
+ break;
+ }
+ case 18: {
+ LastLoginDate = input.ReadString();
+ break;
+ }
+ case 26: {
+ RegDate = input.ReadString();
+ break;
+ }
+ case 32: {
+ Status = (global::AxibugProtobuf.LoginResultStatus) input.ReadEnum();
+ break;
+ }
+ case 40: {
+ UID = input.ReadInt64();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ Token = input.ReadString();
+ break;
+ }
+ case 18: {
+ LastLoginDate = input.ReadString();
+ break;
+ }
+ case 26: {
+ RegDate = input.ReadString();
+ break;
+ }
+ case 32: {
+ Status = (global::AxibugProtobuf.LoginResultStatus) input.ReadEnum();
+ break;
+ }
+ case 40: {
+ UID = input.ReadInt64();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class Protobuf_Screnn_Frame : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Screnn_Frame());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AxibugProtobuf.ProtobufAxibugEmuOnlineReflection.Descriptor.MessageTypes[4]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Screnn_Frame() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Screnn_Frame(Protobuf_Screnn_Frame other) : this() {
+ frameID_ = other.frameID_;
+ rawBitmap_ = other.rawBitmap_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Screnn_Frame Clone() {
+ return new Protobuf_Screnn_Frame(this);
+ }
+
+ /// Field number for the "FrameID" field.
+ public const int FrameIDFieldNumber = 1;
+ private int frameID_;
+ ///
+ ///帧编号
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FrameID {
+ get { return frameID_; }
+ set {
+ frameID_ = value;
+ }
+ }
+
+ /// Field number for the "RawBitmap" field.
+ public const int RawBitmapFieldNumber = 2;
+ private pb::ByteString rawBitmap_ = pb::ByteString.Empty;
+ ///
+ ///渲染层画面
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString RawBitmap {
+ get { return rawBitmap_; }
+ set {
+ rawBitmap_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_Screnn_Frame);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_Screnn_Frame other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (FrameID != other.FrameID) return false;
+ if (RawBitmap != other.RawBitmap) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (FrameID != 0) hash ^= FrameID.GetHashCode();
+ if (RawBitmap.Length != 0) hash ^= RawBitmap.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (FrameID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(FrameID);
+ }
+ if (RawBitmap.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(RawBitmap);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (FrameID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(FrameID);
+ }
+ if (RawBitmap.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(RawBitmap);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (FrameID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(FrameID);
+ }
+ if (RawBitmap.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(RawBitmap);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_Screnn_Frame other) {
+ if (other == null) {
+ return;
+ }
+ if (other.FrameID != 0) {
+ FrameID = other.FrameID;
+ }
+ if (other.RawBitmap.Length != 0) {
+ RawBitmap = other.RawBitmap;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ FrameID = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ RawBitmap = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 8: {
+ FrameID = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ RawBitmap = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto b/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto
new file mode 100644
index 00000000..655cc5ec
--- /dev/null
+++ b/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto
@@ -0,0 +1,81 @@
+syntax = "proto3";
+package AxibugProtobuf;
+option optimize_for = SPEED;
+
+enum CommandID
+{
+ CMD_DEFAUL = 0;//缺省不使用
+
+ CMD_LOGIN = 2001; //自动登录上行 | 下行 对应 Protobuf_Login | Protobuf_Login_RESP
+
+ CMD_CHATMSG = 4001; //广播信息上行 | 下行 对应 Protobuf_ChatMsg | Protobuf_ChatMsg_RESP
+
+ CMD_Screen = 5001; //画面同步 | 同步广播 对应 Protobuf_Screnn_Frame
+}
+
+enum ErrorCode
+{
+ ERROR_DEFAUL = 0;//缺省不使用
+ ERROR_OK = 1; //成功
+}
+
+enum LoginType
+{
+ BaseDefault = 0;//缺省不使用
+}
+
+enum DeviceType
+{
+ DeviceType_Default = 0;//缺省不使用
+ PC = 1;
+ Android = 2;
+ IOS = 3;
+ PSV = 4;
+}
+
+enum LoginResultStatus
+{
+ LoginResultStatus_BaseDefault = 0;//缺省不使用
+ OK = 1;
+ AccountErr = 2;
+}
+
+//聊天 上行
+message Protobuf_ChatMsg
+{
+ string ChatMsg = 1;//消息
+}
+
+//聊天 下行
+message Protobuf_ChatMsg_RESP
+{
+ string NickName = 1;//昵称
+ string ChatMsg = 2;//消息
+ int64 Date = 3;//时间
+}
+
+
+//登录数据上行
+message Protobuf_Login
+{
+ LoginType loginType = 1;//登录操作类型 [0]皓月通行证 [3] 皓月BF3 [4] 皓月BF4
+ DeviceType deviceType = 2;//设备类型 [0]PC [1]AndroidPad预留 [3]IPad预留
+ string Account = 3;//用户名
+ string Password = 4;//密码
+}
+
+//登录数据下行
+message Protobuf_Login_RESP
+{
+ string Token = 1;//登录凭据 (本次登录之后,所有业务请求凭据,需要存储在内存中)
+ string LastLoginDate = 2;//上次登录时间(只用于呈现的字符串,若界面需求需要)
+ string RegDate = 3;//注册时间(只用于呈现的字符串,若界面需求需要)
+ LoginResultStatus Status = 4;//账号状态 (预留) [1]正常[0]被禁封
+ int64 UID = 5;
+}
+
+message Protobuf_Screnn_Frame
+{
+ int32 FrameID = 1;//帧编号
+ bytes RawBitmap = 2;//渲染层画面
+}
\ No newline at end of file
diff --git a/ProtobufCore/protoc.exe b/ProtobufCore/protoc.exe
new file mode 100644
index 00000000..f101dae9
Binary files /dev/null and b/ProtobufCore/protoc.exe differ