diff --git a/Lib/Google.Protobuf.dll b/Lib/Google.Protobuf.dll
new file mode 100644
index 0000000..7663c31
Binary files /dev/null and b/Lib/Google.Protobuf.dll differ
diff --git a/Lib/HaoYueNet.ClientNetwork.dll b/Lib/HaoYueNet.ClientNetwork.dll
new file mode 100644
index 0000000..4047ac2
Binary files /dev/null and b/Lib/HaoYueNet.ClientNetwork.dll differ
diff --git a/Lib/HaoYueNet.ServerNetwork.dll b/Lib/HaoYueNet.ServerNetwork.dll
new file mode 100644
index 0000000..7258049
Binary files /dev/null and b/Lib/HaoYueNet.ServerNetwork.dll differ
diff --git a/NoSugarNet.ServerCore/Common/CompressAdapter.cs b/NoSugarNet.ServerCore/Common/CompressAdapter.cs
new file mode 100644
index 0000000..90b589e
--- /dev/null
+++ b/NoSugarNet.ServerCore/Common/CompressAdapter.cs
@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace NoSugarNet.ServerCore.Common
+{
+ ///
+ /// 压缩适配器
+ ///
+ public class CompressAdapter
+ {
+ IDataCompress mIDataCompress;
+ public CompressAdapter(ushort type)
+ {
+ switch (type)
+ {
+ //不压缩
+ case 0:
+ mIDataCompress = new NoCompress();
+ break;
+ //TODO 其他压缩对比
+ default:
+ mIDataCompress = new NoCompress();
+ break;
+ }
+ }
+
+
+ public byte[] Compress(byte[] data)
+ {
+ return mIDataCompress.Compress(data);
+ }
+ public byte[] Decompress(byte[] data)
+ {
+ return mIDataCompress.Decompress(data);
+ }
+ }
+
+
+ public interface IDataCompress
+ {
+ public byte[] Compress(byte[] data);
+ public byte[] Decompress(byte[] data);
+ }
+
+ public class NoCompress : IDataCompress
+ {
+ public byte[] Compress(byte[] data)
+ {
+ return data;
+ }
+ public byte[] Decompress(byte[] data)
+ {
+ return data;
+ }
+ }
+}
diff --git a/NoSugarNet.ServerCore/Common/Helper.cs b/NoSugarNet.ServerCore/Common/Helper.cs
new file mode 100644
index 0000000..027c25a
--- /dev/null
+++ b/NoSugarNet.ServerCore/Common/Helper.cs
@@ -0,0 +1,20 @@
+namespace ServerCore.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/NoSugarNet.ServerCore/Common/ProtoBufHelper.cs b/NoSugarNet.ServerCore/Common/ProtoBufHelper.cs
new file mode 100644
index 0000000..04e9c46
--- /dev/null
+++ b/NoSugarNet.ServerCore/Common/ProtoBufHelper.cs
@@ -0,0 +1,22 @@
+using Google.Protobuf;
+
+namespace ServerCore.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/NoSugarNet.ServerCore/Event/EEvent.cs b/NoSugarNet.ServerCore/Event/EEvent.cs
new file mode 100644
index 0000000..8e8f6e0
--- /dev/null
+++ b/NoSugarNet.ServerCore/Event/EEvent.cs
@@ -0,0 +1,9 @@
+namespace ServerCore.Event
+{
+ public enum EEvent
+ {
+ // 添加你自己需要的事件类型
+ OnUserJoin,
+ OnUserLeave
+ }
+}
diff --git a/NoSugarNet.ServerCore/Event/EventSystem.cs b/NoSugarNet.ServerCore/Event/EventSystem.cs
new file mode 100644
index 0000000..900c61a
--- /dev/null
+++ b/NoSugarNet.ServerCore/Event/EventSystem.cs
@@ -0,0 +1,216 @@
+using ServerCore.Manager;
+
+namespace ServerCore.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/NoSugarNet.ServerCore/Manager/ChatManager.cs b/NoSugarNet.ServerCore/Manager/ChatManager.cs
new file mode 100644
index 0000000..08b8516
--- /dev/null
+++ b/NoSugarNet.ServerCore/Manager/ChatManager.cs
@@ -0,0 +1,29 @@
+using AxibugProtobuf;
+using ServerCore.Common;
+using ServerCore.NetWork;
+using System.Net.Sockets;
+
+namespace ServerCore.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/NoSugarNet.ServerCore/Manager/ClientManager.cs b/NoSugarNet.ServerCore/Manager/ClientManager.cs
new file mode 100644
index 0000000..b2b1128
--- /dev/null
+++ b/NoSugarNet.ServerCore/Manager/ClientManager.cs
@@ -0,0 +1,234 @@
+using AxibugProtobuf;
+using System.Net.Sockets;
+using System.Timers;
+
+namespace ServerCore.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;
+
+ Console.WriteLine("标记玩家UID" + _DictSocketClient[sk].UID + "为离线");
+ _DictSocketClient[sk].IsOffline = true;
+ _DictSocketClient[sk].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)
+ {
+ ClientSend(ClientList, CMDID, ERRCODE, data);
+ }
+
+ ///
+ /// 给一组用户发送数据
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void ClientSend(List _toclientlist, int CMDID, int ERRCODE, byte[] data)
+ {
+ for (int i = 0; i < _toclientlist.Count(); i++)
+ {
+ if (_toclientlist[i] == null || _toclientlist[i].IsOffline)
+ 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/NoSugarNet.ServerCore/Manager/LocalClientManager.cs b/NoSugarNet.ServerCore/Manager/LocalClientManager.cs
new file mode 100644
index 0000000..a27d414
--- /dev/null
+++ b/NoSugarNet.ServerCore/Manager/LocalClientManager.cs
@@ -0,0 +1,242 @@
+using AxibugProtobuf;
+using ClientCore.Network;
+using Google.Protobuf;
+using NoSugarNet.ServerCore.Common;
+using ServerCore.Common;
+using ServerCore.NetWork;
+using System.Net.Sockets;
+
+namespace ServerCore.Manager
+{
+ public class LocalClientManager
+ {
+ struct TunnelClientData
+ {
+ public string IP;
+ public ushort Port;
+ }
+
+ Dictionary mDictTunnelID2Cfg = new Dictionary();
+ Dictionary> mDictUid2ServerLocalClients = new Dictionary>();
+ CompressAdapter mCompressAdapter;
+
+ public LocalClientManager()
+ {
+ //初始化压缩适配器,暂时使用0,代表压缩类型
+ mCompressAdapter = new CompressAdapter(0);
+ //注册网络消息
+ NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdTunnelC2SConnect, Recive_TunnelC2SConnect);
+ NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdTunnelC2SDisconnect, Recive_TunnelC2SDisconnect);
+ NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdTunnelC2SData, Recive_TunnelC2SData);
+ }
+
+ #region 连接字典管理
+ ///
+ /// 追加连接
+ ///
+ ///
+ ///
+ ///
+ void AddServerLocalClient(long uid, byte tunnelId, ServerLocalClient serverClient)
+ {
+ lock (mDictUid2ServerLocalClients)
+ {
+ if (!mDictUid2ServerLocalClients.ContainsKey(uid))
+ mDictUid2ServerLocalClients[uid] = new Dictionary();
+
+ mDictUid2ServerLocalClients[uid][tunnelId] = serverClient;
+ }
+ }
+ ///
+ /// 删除连接
+ ///
+ ///
+ ///
+ void RemoveServerLocalClient(long uid, byte tunnelId)
+ {
+ lock (mDictUid2ServerLocalClients)
+ {
+ if (!mDictUid2ServerLocalClients.ContainsKey(uid))
+ return;
+
+ if (!mDictUid2ServerLocalClients[uid].ContainsKey(tunnelId))
+ return;
+
+ mDictUid2ServerLocalClients[uid].Remove(tunnelId);
+
+ if (mDictUid2ServerLocalClients[uid].Count < 1)
+ mDictUid2ServerLocalClients.Remove(uid);
+ }
+ }
+ bool GetServerLocalClient(long uid, byte tunnelId,out ServerLocalClient serverLocalClient)
+ {
+ serverLocalClient = null;
+ if (!mDictUid2ServerLocalClients.ContainsKey(uid))
+ return false;
+
+ if (!mDictUid2ServerLocalClients[uid].ContainsKey(tunnelId))
+ return false;
+
+ serverLocalClient = mDictUid2ServerLocalClients[uid][tunnelId];
+ return true;
+ }
+ #endregion
+
+
+ #region 解析客户端上行数据
+ public void Recive_TunnelC2SConnect(Socket sk, byte[] reqData)
+ {
+ ClientInfo _c = ServerManager.g_ClientMgr.GetClientForSocket(sk);
+ ServerManager.g_Log.Debug("OnTunnelC2SConnect");
+ Protobuf_C2S_Connect msg = ProtoBufHelper.DeSerizlize(reqData);
+ OnClientLocalConnect(_c.UID, (byte)msg.TunnelID);
+ }
+ public void Recive_TunnelC2SDisconnect(Socket sk, byte[] reqData)
+ {
+ ClientInfo _c = ServerManager.g_ClientMgr.GetClientForSocket(sk);
+ ServerManager.g_Log.Debug("Recive_TunnelC2SDisconnect");
+ Protobuf_C2S_Disconnect msg = ProtoBufHelper.DeSerizlize(reqData);
+ OnClientLocalDisconnect(_c.UID, (byte)msg.TunnelID);
+ }
+ public void Recive_TunnelC2SData(Socket sk, byte[] reqData)
+ {
+ ClientInfo _c = ServerManager.g_ClientMgr.GetClientForSocket(sk);
+ ServerManager.g_Log.Debug("OnTunnelC2SData");
+ Protobuf_C2S_DATA msg = ProtoBufHelper.DeSerizlize(reqData);
+ OnClientTunnelDataCallBack(_c.UID, (byte)msg.TunnelID, msg.HunterNetCoreData.ToArray());
+ }
+ #endregion
+
+
+ #region 两端本地端口连接事件通知
+ ///
+ /// 当客户端本地端口连接
+ ///
+ ///
+ ///
+ void OnClientLocalConnect(long uid, byte tunnelId)
+ {
+ if (!ServerManager.g_ClientMgr.GetClientByUID(uid, out ClientInfo client))
+ return;
+
+ if (!mDictTunnelID2Cfg.ContainsKey(tunnelId))
+ return;
+
+ //开一个线程去建立连接
+ Thread thread = new Thread(() =>
+ {
+ //服务器本地局域网连接指定端口
+ TunnelClientData tunnelDataCfg = mDictTunnelID2Cfg[tunnelId];
+ ServerLocalClient serverLocalClient = new ServerLocalClient(tunnelId);
+ //连接成功
+ if (!serverLocalClient.Init(tunnelDataCfg.IP, tunnelDataCfg.Port))
+ {
+ //连接失败
+ //TODO告知客户端连接失败
+ }
+ });
+ thread.Start();
+ }
+ ///
+ /// 当客户端本地端口连接断开
+ ///
+ ///
+ ///
+ void OnClientLocalDisconnect(long uid, byte tunnelId)
+ {
+ if (!ServerManager.g_ClientMgr.GetClientByUID(uid, out ClientInfo client))
+ return;
+
+ //隧道ID定位投递服务端本地连接
+ if (!GetServerLocalClient(uid, tunnelId, out ServerLocalClient serverLocalClient))
+ return;
+
+ //清楚服务器数据
+ RemoveServerLocalClient(uid, tunnelId);
+ //断开服务端本地客户端连接
+ serverLocalClient.CloseConntect();
+ }
+ ///
+ /// 当服务端本地端口连接
+ ///
+ ///
+ ///
+ public void OnServerLocalConnect(long uid, byte tunnelId, ServerLocalClient serverLocalClient)
+ {
+ if (!ServerManager.g_ClientMgr.GetClientByUID(uid, out ClientInfo client))
+ return;
+
+ //添加到服务端本地连接列表
+ AddServerLocalClient(uid, tunnelId, serverLocalClient);
+
+ byte[] respData = ProtoBufHelper.Serizlize(new Protobuf_S2C_Connect()
+ {
+ TunnelID = tunnelId,
+ });
+ //发送给客户端,指定服务端本地端口已连接
+ ServerManager.g_ClientMgr.ClientSend(client, (int)CommandID.CmdTunnelS2CConnect, (int)ErrorCode.ErrorOk, respData);
+ }
+ ///
+ /// 当服务端本地端口连接断开
+ ///
+ ///
+ ///
+ public void OnServerLocalDisconnect(long uid, byte tunnelId, ServerLocalClient serverLocalClient)
+ {
+ if (!ServerManager.g_ClientMgr.GetClientByUID(uid, out ClientInfo client))
+ return;
+ //添加到服务端本地连接列表
+ RemoveServerLocalClient(uid, tunnelId);
+
+ byte[] respData = ProtoBufHelper.Serizlize(new Protobuf_S2C_Disconnect()
+ {
+ TunnelID = tunnelId,
+ });
+ //发送给客户端,指定服务端本地端口连接已断开
+ ServerManager.g_ClientMgr.ClientSend(client, (int)CommandID.CmdTunnelS2CDisconnect, (int)ErrorCode.ErrorOk, respData);
+ }
+ #endregion
+
+ #region 数据投递
+ ///
+ /// 来自服务端本地连接投递的Tunnel数据
+ ///
+ ///
+ ///
+ ///
+ public void OnServerLocalDataCallBack(long uid, byte tunnelId, byte[] data)
+ {
+ if (!ServerManager.g_ClientMgr.GetClientByUID(uid, out ClientInfo client))
+ return;
+
+ //压缩
+ data = mCompressAdapter.Compress(data);
+ byte[] respData = ProtoBufHelper.Serizlize(new Protobuf_C2S_DATA()
+ {
+ TunnelID = tunnelId,
+ HunterNetCoreData = ByteString.CopyFrom(data)
+ });
+
+ //发送给客户端,指定客户端本地隧道ID
+ ServerManager.g_ClientMgr.ClientSend(client, (int)CommandID.CmdTunnelS2CData, (int)ErrorCode.ErrorOk, respData);
+ }
+ ///
+ /// 来自客户端本地连接投递的Tunnel数据
+ ///
+ ///
+ ///
+ ///
+ public void OnClientTunnelDataCallBack(long uid, byte tunnelId, byte[] data)
+ {
+ //隧道ID定位投递服务端本地连接
+ if (!GetServerLocalClient(uid, tunnelId, out ServerLocalClient serverLocalClient))
+ return;
+
+ //解压
+ data = mCompressAdapter.Decompress(data);
+ //发送给对应服务端本地连接数据
+ serverLocalClient.SendToServer(mCompressAdapter.Decompress(data));
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/NoSugarNet.ServerCore/Manager/LogManager.cs b/NoSugarNet.ServerCore/Manager/LogManager.cs
new file mode 100644
index 0000000..b1d8e77
--- /dev/null
+++ b/NoSugarNet.ServerCore/Manager/LogManager.cs
@@ -0,0 +1,20 @@
+namespace ServerCore.Manager
+{
+ public class LogManager
+ {
+ public void Debug(string str)
+ {
+ Console.WriteLine(str);
+ }
+
+ public void Warning(string str)
+ {
+ Console.WriteLine(str);
+ }
+
+ public void Error(string str)
+ {
+ Console.WriteLine(str);
+ }
+ }
+}
\ No newline at end of file
diff --git a/NoSugarNet.ServerCore/Manager/LoginManager.cs b/NoSugarNet.ServerCore/Manager/LoginManager.cs
new file mode 100644
index 0000000..05d39b8
--- /dev/null
+++ b/NoSugarNet.ServerCore/Manager/LoginManager.cs
@@ -0,0 +1,32 @@
+using AxibugProtobuf;
+using ServerCore.Common;
+using ServerCore.NetWork;
+using System.Net.Sockets;
+
+namespace ServerCore.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 = ""
+ });
+
+ ServerManager.g_ClientMgr.ClientSend(cinfo, (int)CommandID.CmdLogin, (int)ErrorCode.ErrorOk, respData);
+ }
+ }
+}
\ No newline at end of file
diff --git a/NoSugarNet.ServerCore/Manager/ServerLocalClient/ServerLocalClient.cs b/NoSugarNet.ServerCore/Manager/ServerLocalClient/ServerLocalClient.cs
new file mode 100644
index 0000000..b13a35e
--- /dev/null
+++ b/NoSugarNet.ServerCore/Manager/ServerLocalClient/ServerLocalClient.cs
@@ -0,0 +1,76 @@
+using HaoYueNet.ClientNetwork;
+using ServerCore.Manager;
+
+namespace ClientCore.Network
+{
+ ///
+ /// 继承网络库,以支持网络功能
+ ///
+ public class ServerLocalClient : NetworkHelperCore_SourceMode
+ {
+ public long mUID;
+ public byte mTunnelID;
+ public ServerLocalClient(byte TunnelID)
+ {
+ mTunnelID = TunnelID;
+ //指定接收服务器数据事件
+ OnReceiveData += GetDataCallBack;
+ //断开连接
+ OnClose += OnConnectClose;
+ OnConnected += NetworkConnected;
+ //网络库调试信息输出事件,用于打印网络内容
+ OnLogOut += NetworkDeBugLog;
+ }
+
+ public void NetworkConnected(bool IsConnect)
+ {
+ NetworkDeBugLog($"NetworkConnected:{IsConnect}");
+ if (IsConnect)
+ {
+ ServerManager.g_Local.OnServerLocalConnect(mUID, mTunnelID,this);
+ }
+ else
+ {
+ //连接失败
+ NetworkDeBugLog("连接失败!");
+ }
+ }
+
+ public void NetworkDeBugLog(string str)
+ {
+ //用于Unity内的输出
+ //Debug.Log("NetCoreDebug >> "+str);
+ Console.WriteLine("NetCoreDebug >> " + str);
+ }
+
+ ///
+ /// 接受包回调
+ ///
+ /// 协议ID
+ /// 错误编号
+ /// 业务数据
+ public void GetDataCallBack(byte[] data)
+ {
+ NetworkDeBugLog("收到消息 数据长度=>" + data.Length);
+ try
+ {
+ //抛出网络数据
+ ServerManager.g_Local.OnServerLocalDataCallBack(mUID, mTunnelID, data);
+ }
+ catch (Exception ex)
+ {
+ NetworkDeBugLog("逻辑处理错误:" + ex.ToString());
+ }
+
+ }
+
+ ///
+ /// 关闭连接
+ ///
+ public void OnConnectClose()
+ {
+ NetworkDeBugLog("OnConnectClose");
+ ServerManager.g_Local.OnServerLocalDisconnect(mUID, mTunnelID,this);
+ }
+ }
+}
diff --git a/NoSugarNet.ServerCore/Manager/ServerManager.cs b/NoSugarNet.ServerCore/Manager/ServerManager.cs
new file mode 100644
index 0000000..4a7dc96
--- /dev/null
+++ b/NoSugarNet.ServerCore/Manager/ServerManager.cs
@@ -0,0 +1,29 @@
+using ServerCore.NetWork;
+using System.Net;
+
+namespace ServerCore.Manager
+{
+ 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 LocalClientManager g_Local;
+ public static IOCPNetWork g_SocketMgr;
+
+ 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_Local = new LocalClientManager();
+ g_SocketMgr = new IOCPNetWork(1024, 1024);
+ g_SocketMgr.Init();
+ g_SocketMgr.Start(new IPEndPoint(IPAddress.Any.Address, port));
+ Console.WriteLine("Succeed!");
+ }
+ }
+}
\ No newline at end of file
diff --git a/NoSugarNet.ServerCore/NetWork/IOCPNetWork.cs b/NoSugarNet.ServerCore/NetWork/IOCPNetWork.cs
new file mode 100644
index 0000000..f33b821
--- /dev/null
+++ b/NoSugarNet.ServerCore/NetWork/IOCPNetWork.cs
@@ -0,0 +1,64 @@
+using HaoYueNet.ServerNetwork;
+using ServerCore.Manager;
+using System.Net.Sockets;
+
+namespace ServerCore.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/NoSugarNet.ServerCore/NetWork/NetMsg.cs b/NoSugarNet.ServerCore/NetWork/NetMsg.cs
new file mode 100644
index 0000000..9391dd7
--- /dev/null
+++ b/NoSugarNet.ServerCore/NetWork/NetMsg.cs
@@ -0,0 +1,97 @@
+using ServerCore.Manager;
+using System.Net.Sockets;
+
+namespace ServerCore.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/NoSugarNet.ServerCore/NoSugarNet.ServerCore.csproj b/NoSugarNet.ServerCore/NoSugarNet.ServerCore.csproj
new file mode 100644
index 0000000..9e5bc6c
--- /dev/null
+++ b/NoSugarNet.ServerCore/NoSugarNet.ServerCore.csproj
@@ -0,0 +1,18 @@
+
+
+
+ net7.0
+ enable
+ enable
+
+
+
+
+ ..\Lib\Google.Protobuf.dll
+
+
+ ..\Lib\HaoYueNet.ServerNetwork.dll
+
+
+
+
diff --git a/NoSugarNet.ServerCore/Protobuf/ProtobufNoSugar.cs b/NoSugarNet.ServerCore/Protobuf/ProtobufNoSugar.cs
new file mode 100644
index 0000000..4fa9bc6
--- /dev/null
+++ b/NoSugarNet.ServerCore/Protobuf/ProtobufNoSugar.cs
@@ -0,0 +1,2307 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: protobuf_NoSugar.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_NoSugar.proto
+ public static partial class ProtobufNoSugarReflection {
+
+ #region Descriptor
+ /// File descriptor for protobuf_NoSugar.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static ProtobufNoSugarReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChZwcm90b2J1Zl9Ob1N1Z2FyLnByb3RvEg5BeGlidWdQcm90b2J1ZiKRAQoO",
+ "UHJvdG9idWZfTG9naW4SLAoJbG9naW5UeXBlGAEgASgOMhkuQXhpYnVnUHJv",
+ "dG9idWYuTG9naW5UeXBlEi4KCmRldmljZVR5cGUYAiABKA4yGi5BeGlidWdQ",
+ "cm90b2J1Zi5EZXZpY2VUeXBlEg8KB0FjY291bnQYAyABKAkSEAoIUGFzc3dv",
+ "cmQYBCABKAkifwoTUHJvdG9idWZfTG9naW5fUkVTUBINCgVUb2tlbhgBIAEo",
+ "CRIVCg1MYXN0TG9naW5EYXRlGAIgASgJEg8KB1JlZ0RhdGUYAyABKAkSMQoG",
+ "U3RhdHVzGAQgASgOMiEuQXhpYnVnUHJvdG9idWYuTG9naW5SZXN1bHRTdGF0",
+ "dXMiIwoQUHJvdG9idWZfQ2hhdE1zZxIPCgdDaGF0TXNnGAEgASgJIkgKFVBy",
+ "b3RvYnVmX0NoYXRNc2dfUkVTUBIQCghOaWNrTmFtZRgBIAEoCRIPCgdDaGF0",
+ "TXNnGAIgASgJEgwKBERhdGUYAyABKAMiKAoUUHJvdG9idWZfQzJTX0Nvbm5l",
+ "Y3QSEAoIVHVubmVsSUQYASABKAUiKAoUUHJvdG9idWZfUzJDX0Nvbm5lY3QS",
+ "EAoIVHVubmVsSUQYASABKAUiKwoXUHJvdG9idWZfQzJTX0Rpc2Nvbm5lY3QS",
+ "EAoIVHVubmVsSUQYASABKAUiKwoXUHJvdG9idWZfUzJDX0Rpc2Nvbm5lY3QS",
+ "EAoIVHVubmVsSUQYASABKAUiQQoRUHJvdG9idWZfQzJTX0RBVEESEAoIVHVu",
+ "bmVsSUQYASABKAUSGgoSSHVudGVyTmV0Q29yZV9EYXRhGAIgASgMIkEKEVBy",
+ "b3RvYnVmX1MyQ19EQVRBEhAKCFR1bm5lbElEGAEgASgFEhoKEkh1bnRlck5l",
+ "dENvcmVfRGF0YRgCIAEoDCrrAQoJQ29tbWFuZElEEg4KCkNNRF9ERUZBVUwQ",
+ "ABIOCglDTURfTE9HSU4Q0Q8SEAoLQ01EX0NIQVRNU0cQoR8SGwoWQ01EX1RV",
+ "Tk5FTF9DMlNfQ09OTkVDVBCIJxIbChZDTURfVFVOTkVMX1MyQ19DT05ORUNU",
+ "EIknEh4KGUNNRF9UVU5ORUxfQzJTX0RJU0NPTk5FQ1QQiicSHgoZQ01EX1RV",
+ "Tk5FTF9TMkNfRElTQ09OTkVDVBCLJxIYChNDTURfVFVOTkVMX0MyU19EQVRB",
+ "EIwnEhgKE0NNRF9UVU5ORUxfUzJDX0RBVEEQjScqKwoJRXJyb3JDb2RlEhAK",
+ "DEVSUk9SX0RFRkFVTBAAEgwKCEVSUk9SX09LEAEqPgoJTG9naW5UeXBlEg8K",
+ "C0Jhc2VEZWZhdWx0EAASDgoKSGFvWXVlQXV0aBABEgcKA0JGMxADEgcKA0JG",
+ "NBAEKksKCkRldmljZVR5cGUSFgoSRGV2aWNlVHlwZV9EZWZhdWx0EAASBgoC",
+ "UEMQARILCgdBbmRyb2lkEAISBwoDSU9TEAMSBwoDUFNWEAQqTgoRTG9naW5S",
+ "ZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFzZURlZmF1bHQQ",
+ "ABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3RvMw=="));
+ 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_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" }, null, null, null, null),
+ 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_C2S_Connect), global::AxibugProtobuf.Protobuf_C2S_Connect.Parser, new[]{ "TunnelID" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_S2C_Connect), global::AxibugProtobuf.Protobuf_S2C_Connect.Parser, new[]{ "TunnelID" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_C2S_Disconnect), global::AxibugProtobuf.Protobuf_C2S_Disconnect.Parser, new[]{ "TunnelID" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_S2C_Disconnect), global::AxibugProtobuf.Protobuf_S2C_Disconnect.Parser, new[]{ "TunnelID" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_C2S_DATA), global::AxibugProtobuf.Protobuf_C2S_DATA.Parser, new[]{ "TunnelID", "HunterNetCoreData" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_S2C_DATA), global::AxibugProtobuf.Protobuf_S2C_DATA.Parser, new[]{ "TunnelID", "HunterNetCoreData" }, 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_C2S_Connect
+ ///
+ [pbr::OriginalName("CMD_TUNNEL_C2S_CONNECT")] CmdTunnelC2SConnect = 5000,
+ ///
+ ///服务端告知客户端 服务端本地连接建立 下行 Protobuf_S2C_Connect
+ ///
+ [pbr::OriginalName("CMD_TUNNEL_S2C_CONNECT")] CmdTunnelS2CConnect = 5001,
+ ///
+ ///客户端告知服务端 客户端本地连接断开 上行 Protobuf_C2S_Disconnect
+ ///
+ [pbr::OriginalName("CMD_TUNNEL_C2S_DISCONNECT")] CmdTunnelC2SDisconnect = 5002,
+ ///
+ ///服务端告知客户端 服务端本地连接断开 下行 Protobuf_S2C_Disconnect
+ ///
+ [pbr::OriginalName("CMD_TUNNEL_S2C_DISCONNECT")] CmdTunnelS2CDisconnect = 5003,
+ ///
+ ///客户端投递本地TCP通讯数据包 上行 Protobuf_C2S_DATA
+ ///
+ [pbr::OriginalName("CMD_TUNNEL_C2S_DATA")] CmdTunnelC2SData = 5004,
+ ///
+ ///服务端投递本地TCP通讯数据包 下行 Protobuf_S2C_DATA
+ ///
+ [pbr::OriginalName("CMD_TUNNEL_S2C_DATA")] CmdTunnelS2CData = 5005,
+ }
+
+ public enum ErrorCode {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("ERROR_DEFAUL")] ErrorDefaul = 0,
+ ///
+ ///成功
+ ///
+ [pbr::OriginalName("ERROR_OK")] ErrorOk = 1,
+ }
+
+ public enum LoginType {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("BaseDefault")] BaseDefault = 0,
+ [pbr::OriginalName("HaoYueAuth")] HaoYueAuth = 1,
+ [pbr::OriginalName("BF3")] Bf3 = 3,
+ [pbr::OriginalName("BF4")] Bf4 = 4,
+ }
+
+ 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_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.ProtobufNoSugarReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [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.ProtobufNoSugarReflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [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_;
+ _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;
+ }
+ }
+
+ [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;
+ 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 (_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 (_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 (_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 (_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;
+ }
+ _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;
+ }
+ }
+ }
+ #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;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ ///聊天 上行
+ ///
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[2]; }
+ }
+
+ [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.ProtobufNoSugarReflection.Descriptor.MessageTypes[3]; }
+ }
+
+ [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_C2S_Connect : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_C2S_Connect());
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[4]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_Connect() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_Connect(Protobuf_C2S_Connect other) : this() {
+ tunnelID_ = other.tunnelID_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_Connect Clone() {
+ return new Protobuf_C2S_Connect(this);
+ }
+
+ /// Field number for the "TunnelID" field.
+ public const int TunnelIDFieldNumber = 1;
+ private int tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_C2S_Connect);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_C2S_Connect other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (TunnelID != other.TunnelID) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (TunnelID != 0) hash ^= TunnelID.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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ 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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (TunnelID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TunnelID);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_C2S_Connect other) {
+ if (other == null) {
+ return;
+ }
+ if (other.TunnelID != 0) {
+ TunnelID = other.TunnelID;
+ }
+ _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: {
+ TunnelID = input.ReadInt32();
+ 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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class Protobuf_S2C_Connect : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_S2C_Connect());
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[5]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_Connect() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_Connect(Protobuf_S2C_Connect other) : this() {
+ tunnelID_ = other.tunnelID_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_Connect Clone() {
+ return new Protobuf_S2C_Connect(this);
+ }
+
+ /// Field number for the "TunnelID" field.
+ public const int TunnelIDFieldNumber = 1;
+ private int tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_S2C_Connect);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_S2C_Connect other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (TunnelID != other.TunnelID) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (TunnelID != 0) hash ^= TunnelID.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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ 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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (TunnelID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TunnelID);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_S2C_Connect other) {
+ if (other == null) {
+ return;
+ }
+ if (other.TunnelID != 0) {
+ TunnelID = other.TunnelID;
+ }
+ _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: {
+ TunnelID = input.ReadInt32();
+ 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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class Protobuf_C2S_Disconnect : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_C2S_Disconnect());
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[6]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_Disconnect() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_Disconnect(Protobuf_C2S_Disconnect other) : this() {
+ tunnelID_ = other.tunnelID_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_Disconnect Clone() {
+ return new Protobuf_C2S_Disconnect(this);
+ }
+
+ /// Field number for the "TunnelID" field.
+ public const int TunnelIDFieldNumber = 1;
+ private int tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_C2S_Disconnect);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_C2S_Disconnect other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (TunnelID != other.TunnelID) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (TunnelID != 0) hash ^= TunnelID.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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ 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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (TunnelID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TunnelID);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_C2S_Disconnect other) {
+ if (other == null) {
+ return;
+ }
+ if (other.TunnelID != 0) {
+ TunnelID = other.TunnelID;
+ }
+ _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: {
+ TunnelID = input.ReadInt32();
+ 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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class Protobuf_S2C_Disconnect : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_S2C_Disconnect());
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[7]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_Disconnect() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_Disconnect(Protobuf_S2C_Disconnect other) : this() {
+ tunnelID_ = other.tunnelID_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_Disconnect Clone() {
+ return new Protobuf_S2C_Disconnect(this);
+ }
+
+ /// Field number for the "TunnelID" field.
+ public const int TunnelIDFieldNumber = 1;
+ private int tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_S2C_Disconnect);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_S2C_Disconnect other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (TunnelID != other.TunnelID) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (TunnelID != 0) hash ^= TunnelID.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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ 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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (TunnelID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TunnelID);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_S2C_Disconnect other) {
+ if (other == null) {
+ return;
+ }
+ if (other.TunnelID != 0) {
+ TunnelID = other.TunnelID;
+ }
+ _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: {
+ TunnelID = input.ReadInt32();
+ 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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class Protobuf_C2S_DATA : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_C2S_DATA());
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[8]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_DATA() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_DATA(Protobuf_C2S_DATA other) : this() {
+ tunnelID_ = other.tunnelID_;
+ hunterNetCoreData_ = other.hunterNetCoreData_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_DATA Clone() {
+ return new Protobuf_C2S_DATA(this);
+ }
+
+ /// Field number for the "TunnelID" field.
+ public const int TunnelIDFieldNumber = 1;
+ private int tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ /// Field number for the "HunterNetCore_Data" field.
+ public const int HunterNetCoreDataFieldNumber = 2;
+ private pb::ByteString hunterNetCoreData_ = pb::ByteString.Empty;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString HunterNetCoreData {
+ get { return hunterNetCoreData_; }
+ set {
+ hunterNetCoreData_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_C2S_DATA);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_C2S_DATA other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (TunnelID != other.TunnelID) return false;
+ if (HunterNetCoreData != other.HunterNetCoreData) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (TunnelID != 0) hash ^= TunnelID.GetHashCode();
+ if (HunterNetCoreData.Length != 0) hash ^= HunterNetCoreData.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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(HunterNetCoreData);
+ }
+ 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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(HunterNetCoreData);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (TunnelID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TunnelID);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(HunterNetCoreData);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_C2S_DATA other) {
+ if (other == null) {
+ return;
+ }
+ if (other.TunnelID != 0) {
+ TunnelID = other.TunnelID;
+ }
+ if (other.HunterNetCoreData.Length != 0) {
+ HunterNetCoreData = other.HunterNetCoreData;
+ }
+ _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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ HunterNetCoreData = 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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ HunterNetCoreData = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class Protobuf_S2C_DATA : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_S2C_DATA());
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[9]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_DATA() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_DATA(Protobuf_S2C_DATA other) : this() {
+ tunnelID_ = other.tunnelID_;
+ hunterNetCoreData_ = other.hunterNetCoreData_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_DATA Clone() {
+ return new Protobuf_S2C_DATA(this);
+ }
+
+ /// Field number for the "TunnelID" field.
+ public const int TunnelIDFieldNumber = 1;
+ private int tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ /// Field number for the "HunterNetCore_Data" field.
+ public const int HunterNetCoreDataFieldNumber = 2;
+ private pb::ByteString hunterNetCoreData_ = pb::ByteString.Empty;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString HunterNetCoreData {
+ get { return hunterNetCoreData_; }
+ set {
+ hunterNetCoreData_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_S2C_DATA);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_S2C_DATA other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (TunnelID != other.TunnelID) return false;
+ if (HunterNetCoreData != other.HunterNetCoreData) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (TunnelID != 0) hash ^= TunnelID.GetHashCode();
+ if (HunterNetCoreData.Length != 0) hash ^= HunterNetCoreData.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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(HunterNetCoreData);
+ }
+ 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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(HunterNetCoreData);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (TunnelID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TunnelID);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(HunterNetCoreData);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_S2C_DATA other) {
+ if (other == null) {
+ return;
+ }
+ if (other.TunnelID != 0) {
+ TunnelID = other.TunnelID;
+ }
+ if (other.HunterNetCoreData.Length != 0) {
+ HunterNetCoreData = other.HunterNetCoreData;
+ }
+ _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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ HunterNetCoreData = 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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ HunterNetCoreData = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/NoSugarNet.sln b/NoSugarNet.sln
new file mode 100644
index 0000000..c65b196
--- /dev/null
+++ b/NoSugarNet.sln
@@ -0,0 +1,30 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.7.34031.279
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{EDA9D3FD-1A72-434D-81F6-B1B420406D20}"
+ ProjectSection(SolutionItems) = preProject
+ Lib\HaoYueNet.ServerNetwork.dll = Lib\HaoYueNet.ServerNetwork.dll
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoSugarNet.ServerCore", "NoSugarNet.ServerCore\NoSugarNet.ServerCore.csproj", "{25FB6F12-4619-4D2C-8FC1-70AAAA8AD100}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {25FB6F12-4619-4D2C-8FC1-70AAAA8AD100}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {25FB6F12-4619-4D2C-8FC1-70AAAA8AD100}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {25FB6F12-4619-4D2C-8FC1-70AAAA8AD100}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {25FB6F12-4619-4D2C-8FC1-70AAAA8AD100}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {637DC2BB-F9BB-41A2-ADC0-B41B871F66DE}
+ EndGlobalSection
+EndGlobal
diff --git a/ProtobufCore/build_cs.bat b/ProtobufCore/build_cs.bat
new file mode 100644
index 0000000..94d0344
--- /dev/null
+++ b/ProtobufCore/build_cs.bat
@@ -0,0 +1,17 @@
+@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\ ..\Project2\Assets\Scripts\HotFix\ProtoBuf\
+
+pause
\ No newline at end of file
diff --git a/ProtobufCore/out/CS/ProtobufNoSugar.cs b/ProtobufCore/out/CS/ProtobufNoSugar.cs
new file mode 100644
index 0000000..4fa9bc6
--- /dev/null
+++ b/ProtobufCore/out/CS/ProtobufNoSugar.cs
@@ -0,0 +1,2307 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: protobuf_NoSugar.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_NoSugar.proto
+ public static partial class ProtobufNoSugarReflection {
+
+ #region Descriptor
+ /// File descriptor for protobuf_NoSugar.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static ProtobufNoSugarReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChZwcm90b2J1Zl9Ob1N1Z2FyLnByb3RvEg5BeGlidWdQcm90b2J1ZiKRAQoO",
+ "UHJvdG9idWZfTG9naW4SLAoJbG9naW5UeXBlGAEgASgOMhkuQXhpYnVnUHJv",
+ "dG9idWYuTG9naW5UeXBlEi4KCmRldmljZVR5cGUYAiABKA4yGi5BeGlidWdQ",
+ "cm90b2J1Zi5EZXZpY2VUeXBlEg8KB0FjY291bnQYAyABKAkSEAoIUGFzc3dv",
+ "cmQYBCABKAkifwoTUHJvdG9idWZfTG9naW5fUkVTUBINCgVUb2tlbhgBIAEo",
+ "CRIVCg1MYXN0TG9naW5EYXRlGAIgASgJEg8KB1JlZ0RhdGUYAyABKAkSMQoG",
+ "U3RhdHVzGAQgASgOMiEuQXhpYnVnUHJvdG9idWYuTG9naW5SZXN1bHRTdGF0",
+ "dXMiIwoQUHJvdG9idWZfQ2hhdE1zZxIPCgdDaGF0TXNnGAEgASgJIkgKFVBy",
+ "b3RvYnVmX0NoYXRNc2dfUkVTUBIQCghOaWNrTmFtZRgBIAEoCRIPCgdDaGF0",
+ "TXNnGAIgASgJEgwKBERhdGUYAyABKAMiKAoUUHJvdG9idWZfQzJTX0Nvbm5l",
+ "Y3QSEAoIVHVubmVsSUQYASABKAUiKAoUUHJvdG9idWZfUzJDX0Nvbm5lY3QS",
+ "EAoIVHVubmVsSUQYASABKAUiKwoXUHJvdG9idWZfQzJTX0Rpc2Nvbm5lY3QS",
+ "EAoIVHVubmVsSUQYASABKAUiKwoXUHJvdG9idWZfUzJDX0Rpc2Nvbm5lY3QS",
+ "EAoIVHVubmVsSUQYASABKAUiQQoRUHJvdG9idWZfQzJTX0RBVEESEAoIVHVu",
+ "bmVsSUQYASABKAUSGgoSSHVudGVyTmV0Q29yZV9EYXRhGAIgASgMIkEKEVBy",
+ "b3RvYnVmX1MyQ19EQVRBEhAKCFR1bm5lbElEGAEgASgFEhoKEkh1bnRlck5l",
+ "dENvcmVfRGF0YRgCIAEoDCrrAQoJQ29tbWFuZElEEg4KCkNNRF9ERUZBVUwQ",
+ "ABIOCglDTURfTE9HSU4Q0Q8SEAoLQ01EX0NIQVRNU0cQoR8SGwoWQ01EX1RV",
+ "Tk5FTF9DMlNfQ09OTkVDVBCIJxIbChZDTURfVFVOTkVMX1MyQ19DT05ORUNU",
+ "EIknEh4KGUNNRF9UVU5ORUxfQzJTX0RJU0NPTk5FQ1QQiicSHgoZQ01EX1RV",
+ "Tk5FTF9TMkNfRElTQ09OTkVDVBCLJxIYChNDTURfVFVOTkVMX0MyU19EQVRB",
+ "EIwnEhgKE0NNRF9UVU5ORUxfUzJDX0RBVEEQjScqKwoJRXJyb3JDb2RlEhAK",
+ "DEVSUk9SX0RFRkFVTBAAEgwKCEVSUk9SX09LEAEqPgoJTG9naW5UeXBlEg8K",
+ "C0Jhc2VEZWZhdWx0EAASDgoKSGFvWXVlQXV0aBABEgcKA0JGMxADEgcKA0JG",
+ "NBAEKksKCkRldmljZVR5cGUSFgoSRGV2aWNlVHlwZV9EZWZhdWx0EAASBgoC",
+ "UEMQARILCgdBbmRyb2lkEAISBwoDSU9TEAMSBwoDUFNWEAQqTgoRTG9naW5S",
+ "ZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFzZURlZmF1bHQQ",
+ "ABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3RvMw=="));
+ 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_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" }, null, null, null, null),
+ 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_C2S_Connect), global::AxibugProtobuf.Protobuf_C2S_Connect.Parser, new[]{ "TunnelID" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_S2C_Connect), global::AxibugProtobuf.Protobuf_S2C_Connect.Parser, new[]{ "TunnelID" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_C2S_Disconnect), global::AxibugProtobuf.Protobuf_C2S_Disconnect.Parser, new[]{ "TunnelID" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_S2C_Disconnect), global::AxibugProtobuf.Protobuf_S2C_Disconnect.Parser, new[]{ "TunnelID" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_C2S_DATA), global::AxibugProtobuf.Protobuf_C2S_DATA.Parser, new[]{ "TunnelID", "HunterNetCoreData" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_S2C_DATA), global::AxibugProtobuf.Protobuf_S2C_DATA.Parser, new[]{ "TunnelID", "HunterNetCoreData" }, 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_C2S_Connect
+ ///
+ [pbr::OriginalName("CMD_TUNNEL_C2S_CONNECT")] CmdTunnelC2SConnect = 5000,
+ ///
+ ///服务端告知客户端 服务端本地连接建立 下行 Protobuf_S2C_Connect
+ ///
+ [pbr::OriginalName("CMD_TUNNEL_S2C_CONNECT")] CmdTunnelS2CConnect = 5001,
+ ///
+ ///客户端告知服务端 客户端本地连接断开 上行 Protobuf_C2S_Disconnect
+ ///
+ [pbr::OriginalName("CMD_TUNNEL_C2S_DISCONNECT")] CmdTunnelC2SDisconnect = 5002,
+ ///
+ ///服务端告知客户端 服务端本地连接断开 下行 Protobuf_S2C_Disconnect
+ ///
+ [pbr::OriginalName("CMD_TUNNEL_S2C_DISCONNECT")] CmdTunnelS2CDisconnect = 5003,
+ ///
+ ///客户端投递本地TCP通讯数据包 上行 Protobuf_C2S_DATA
+ ///
+ [pbr::OriginalName("CMD_TUNNEL_C2S_DATA")] CmdTunnelC2SData = 5004,
+ ///
+ ///服务端投递本地TCP通讯数据包 下行 Protobuf_S2C_DATA
+ ///
+ [pbr::OriginalName("CMD_TUNNEL_S2C_DATA")] CmdTunnelS2CData = 5005,
+ }
+
+ public enum ErrorCode {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("ERROR_DEFAUL")] ErrorDefaul = 0,
+ ///
+ ///成功
+ ///
+ [pbr::OriginalName("ERROR_OK")] ErrorOk = 1,
+ }
+
+ public enum LoginType {
+ ///
+ ///缺省不使用
+ ///
+ [pbr::OriginalName("BaseDefault")] BaseDefault = 0,
+ [pbr::OriginalName("HaoYueAuth")] HaoYueAuth = 1,
+ [pbr::OriginalName("BF3")] Bf3 = 3,
+ [pbr::OriginalName("BF4")] Bf4 = 4,
+ }
+
+ 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_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.ProtobufNoSugarReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [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.ProtobufNoSugarReflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [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_;
+ _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;
+ }
+ }
+
+ [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;
+ 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 (_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 (_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 (_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 (_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;
+ }
+ _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;
+ }
+ }
+ }
+ #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;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ ///聊天 上行
+ ///
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[2]; }
+ }
+
+ [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.ProtobufNoSugarReflection.Descriptor.MessageTypes[3]; }
+ }
+
+ [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_C2S_Connect : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_C2S_Connect());
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[4]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_Connect() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_Connect(Protobuf_C2S_Connect other) : this() {
+ tunnelID_ = other.tunnelID_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_Connect Clone() {
+ return new Protobuf_C2S_Connect(this);
+ }
+
+ /// Field number for the "TunnelID" field.
+ public const int TunnelIDFieldNumber = 1;
+ private int tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_C2S_Connect);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_C2S_Connect other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (TunnelID != other.TunnelID) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (TunnelID != 0) hash ^= TunnelID.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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ 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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (TunnelID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TunnelID);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_C2S_Connect other) {
+ if (other == null) {
+ return;
+ }
+ if (other.TunnelID != 0) {
+ TunnelID = other.TunnelID;
+ }
+ _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: {
+ TunnelID = input.ReadInt32();
+ 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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class Protobuf_S2C_Connect : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_S2C_Connect());
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[5]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_Connect() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_Connect(Protobuf_S2C_Connect other) : this() {
+ tunnelID_ = other.tunnelID_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_Connect Clone() {
+ return new Protobuf_S2C_Connect(this);
+ }
+
+ /// Field number for the "TunnelID" field.
+ public const int TunnelIDFieldNumber = 1;
+ private int tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_S2C_Connect);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_S2C_Connect other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (TunnelID != other.TunnelID) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (TunnelID != 0) hash ^= TunnelID.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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ 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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (TunnelID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TunnelID);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_S2C_Connect other) {
+ if (other == null) {
+ return;
+ }
+ if (other.TunnelID != 0) {
+ TunnelID = other.TunnelID;
+ }
+ _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: {
+ TunnelID = input.ReadInt32();
+ 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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class Protobuf_C2S_Disconnect : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_C2S_Disconnect());
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[6]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_Disconnect() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_Disconnect(Protobuf_C2S_Disconnect other) : this() {
+ tunnelID_ = other.tunnelID_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_Disconnect Clone() {
+ return new Protobuf_C2S_Disconnect(this);
+ }
+
+ /// Field number for the "TunnelID" field.
+ public const int TunnelIDFieldNumber = 1;
+ private int tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_C2S_Disconnect);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_C2S_Disconnect other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (TunnelID != other.TunnelID) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (TunnelID != 0) hash ^= TunnelID.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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ 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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (TunnelID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TunnelID);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_C2S_Disconnect other) {
+ if (other == null) {
+ return;
+ }
+ if (other.TunnelID != 0) {
+ TunnelID = other.TunnelID;
+ }
+ _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: {
+ TunnelID = input.ReadInt32();
+ 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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class Protobuf_S2C_Disconnect : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_S2C_Disconnect());
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[7]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_Disconnect() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_Disconnect(Protobuf_S2C_Disconnect other) : this() {
+ tunnelID_ = other.tunnelID_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_Disconnect Clone() {
+ return new Protobuf_S2C_Disconnect(this);
+ }
+
+ /// Field number for the "TunnelID" field.
+ public const int TunnelIDFieldNumber = 1;
+ private int tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_S2C_Disconnect);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_S2C_Disconnect other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (TunnelID != other.TunnelID) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (TunnelID != 0) hash ^= TunnelID.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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ 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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (TunnelID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TunnelID);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_S2C_Disconnect other) {
+ if (other == null) {
+ return;
+ }
+ if (other.TunnelID != 0) {
+ TunnelID = other.TunnelID;
+ }
+ _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: {
+ TunnelID = input.ReadInt32();
+ 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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class Protobuf_C2S_DATA : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_C2S_DATA());
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[8]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_DATA() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_DATA(Protobuf_C2S_DATA other) : this() {
+ tunnelID_ = other.tunnelID_;
+ hunterNetCoreData_ = other.hunterNetCoreData_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_C2S_DATA Clone() {
+ return new Protobuf_C2S_DATA(this);
+ }
+
+ /// Field number for the "TunnelID" field.
+ public const int TunnelIDFieldNumber = 1;
+ private int tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ /// Field number for the "HunterNetCore_Data" field.
+ public const int HunterNetCoreDataFieldNumber = 2;
+ private pb::ByteString hunterNetCoreData_ = pb::ByteString.Empty;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString HunterNetCoreData {
+ get { return hunterNetCoreData_; }
+ set {
+ hunterNetCoreData_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_C2S_DATA);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_C2S_DATA other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (TunnelID != other.TunnelID) return false;
+ if (HunterNetCoreData != other.HunterNetCoreData) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (TunnelID != 0) hash ^= TunnelID.GetHashCode();
+ if (HunterNetCoreData.Length != 0) hash ^= HunterNetCoreData.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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(HunterNetCoreData);
+ }
+ 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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(HunterNetCoreData);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (TunnelID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TunnelID);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(HunterNetCoreData);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_C2S_DATA other) {
+ if (other == null) {
+ return;
+ }
+ if (other.TunnelID != 0) {
+ TunnelID = other.TunnelID;
+ }
+ if (other.HunterNetCoreData.Length != 0) {
+ HunterNetCoreData = other.HunterNetCoreData;
+ }
+ _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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ HunterNetCoreData = 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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ HunterNetCoreData = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class Protobuf_S2C_DATA : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_S2C_DATA());
+ 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.ProtobufNoSugarReflection.Descriptor.MessageTypes[9]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_DATA() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_DATA(Protobuf_S2C_DATA other) : this() {
+ tunnelID_ = other.tunnelID_;
+ hunterNetCoreData_ = other.hunterNetCoreData_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_S2C_DATA Clone() {
+ return new Protobuf_S2C_DATA(this);
+ }
+
+ /// Field number for the "TunnelID" field.
+ public const int TunnelIDFieldNumber = 1;
+ private int tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ /// Field number for the "HunterNetCore_Data" field.
+ public const int HunterNetCoreDataFieldNumber = 2;
+ private pb::ByteString hunterNetCoreData_ = pb::ByteString.Empty;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString HunterNetCoreData {
+ get { return hunterNetCoreData_; }
+ set {
+ hunterNetCoreData_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_S2C_DATA);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_S2C_DATA other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (TunnelID != other.TunnelID) return false;
+ if (HunterNetCoreData != other.HunterNetCoreData) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (TunnelID != 0) hash ^= TunnelID.GetHashCode();
+ if (HunterNetCoreData.Length != 0) hash ^= HunterNetCoreData.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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(HunterNetCoreData);
+ }
+ 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 (TunnelID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(TunnelID);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(HunterNetCoreData);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (TunnelID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(TunnelID);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(HunterNetCoreData);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_S2C_DATA other) {
+ if (other == null) {
+ return;
+ }
+ if (other.TunnelID != 0) {
+ TunnelID = other.TunnelID;
+ }
+ if (other.HunterNetCoreData.Length != 0) {
+ HunterNetCoreData = other.HunterNetCoreData;
+ }
+ _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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ HunterNetCoreData = 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: {
+ TunnelID = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ HunterNetCoreData = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/ProtobufCore/proto/protobuf_NoSugar.proto b/ProtobufCore/proto/protobuf_NoSugar.proto
new file mode 100644
index 0000000..40a1796
--- /dev/null
+++ b/ProtobufCore/proto/protobuf_NoSugar.proto
@@ -0,0 +1,115 @@
+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_TUNNEL_C2S_CONNECT = 5000; //客户端告知服务端 客户端本地连接建立 上行 Protobuf_C2S_Connect
+ CMD_TUNNEL_S2C_CONNECT = 5001; //服务端告知客户端 服务端本地连接建立 下行 Protobuf_S2C_Connect
+ CMD_TUNNEL_C2S_DISCONNECT = 5002; //客户端告知服务端 客户端本地连接断开 上行 Protobuf_C2S_Disconnect
+ CMD_TUNNEL_S2C_DISCONNECT = 5003; //服务端告知客户端 服务端本地连接断开 下行 Protobuf_S2C_Disconnect
+ CMD_TUNNEL_C2S_DATA = 5004; //客户端投递本地TCP通讯数据包 上行 Protobuf_C2S_DATA
+ CMD_TUNNEL_S2C_DATA = 5005; //服务端投递本地TCP通讯数据包 下行 Protobuf_S2C_DATA
+}
+
+enum ErrorCode
+{
+ ERROR_DEFAUL = 0;//缺省不使用
+ ERROR_OK = 1; //成功
+}
+
+enum LoginType
+{
+ BaseDefault = 0;//缺省不使用
+ HaoYueAuth = 1;
+ BF3 = 3;
+ BF4 = 4;
+}
+
+enum DeviceType
+{
+ DeviceType_Default = 0;//缺省不使用
+ PC = 1;
+ Android = 2;
+ IOS = 3;
+ PSV = 4;
+}
+
+enum LoginResultStatus
+{
+ LoginResultStatus_BaseDefault = 0;//缺省不使用
+ OK = 1;
+ AccountErr = 2;
+}
+
+//登录数据上行
+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]被禁封
+}
+
+
+//聊天 上行
+message Protobuf_ChatMsg
+{
+ string ChatMsg = 1;//消息
+}
+
+//聊天 下行
+message Protobuf_ChatMsg_RESP
+{
+ string NickName = 1;//昵称
+ string ChatMsg = 2;//消息
+ int64 Date = 3;//消息
+}
+
+
+message Protobuf_C2S_Connect
+{
+ int32 TunnelID = 1;//TunnelID
+}
+
+message Protobuf_S2C_Connect
+{
+ int32 TunnelID = 1;//TunnelID
+}
+
+message Protobuf_C2S_Disconnect
+{
+ int32 TunnelID = 1;//TunnelID
+}
+
+message Protobuf_S2C_Disconnect
+{
+ int32 TunnelID = 1;//TunnelID
+}
+
+message Protobuf_C2S_DATA
+{
+ int32 TunnelID = 1;//TunnelID
+ bytes HunterNetCore_Data = 2;
+}
+
+message Protobuf_S2C_DATA
+{
+ int32 TunnelID = 1;//TunnelID
+ bytes HunterNetCore_Data = 2;
+}
\ No newline at end of file
diff --git a/ProtobufCore/protoc.exe b/ProtobufCore/protoc.exe
new file mode 100644
index 0000000..f101dae
Binary files /dev/null and b/ProtobufCore/protoc.exe differ