diff --git a/NoSugarNet.ClientCore/App.cs b/NoSugarNet.ClientCore/App.cs
new file mode 100644
index 0000000..8980450
--- /dev/null
+++ b/NoSugarNet.ClientCore/App.cs
@@ -0,0 +1,33 @@
+using NoSugarNet.ClientCore.Manager;
+using NoSugarNet.ClientCore.Network;
+using ServerCore.Manager;
+
+namespace NoSugarNet.ClientCore
+{
+ public class App
+ {
+ public static string TokenStr;
+ public static long RID = -1;
+ public static string IP;
+ public static int Port;
+ public static LogManager log;
+ public static NetworkHelper networkHelper;
+ public static AppLogin login;
+ public static AppChat chat;
+ public static AppLocalClient local;
+ public static UserDataManager user;
+
+ public static void Init(string IP, int port)
+ {
+ log = new LogManager();
+ networkHelper = new NetworkHelper();
+ login = new AppLogin();
+ chat = new AppChat();
+ local = new AppLocalClient();
+ user = new UserDataManager();
+ networkHelper.Init(IP, port);
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/NoSugarNet.ClientCore/Common/CompressAdapter.cs b/NoSugarNet.ClientCore/Common/CompressAdapter.cs
new file mode 100644
index 0000000..e2f4b26
--- /dev/null
+++ b/NoSugarNet.ClientCore/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.ClientCore.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.ClientCore/Common/Helper.cs b/NoSugarNet.ClientCore/Common/Helper.cs
new file mode 100644
index 0000000..086df79
--- /dev/null
+++ b/NoSugarNet.ClientCore/Common/Helper.cs
@@ -0,0 +1,20 @@
+namespace NoSugarNet.ClientCore.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.ClientCore/Common/ProtoBufHelper.cs b/NoSugarNet.ClientCore/Common/ProtoBufHelper.cs
new file mode 100644
index 0000000..f75d2a8
--- /dev/null
+++ b/NoSugarNet.ClientCore/Common/ProtoBufHelper.cs
@@ -0,0 +1,20 @@
+using Google.Protobuf;
+
+namespace NoSugarNet.ClientCore.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.ClientCore/Manager/AppChat.cs b/NoSugarNet.ClientCore/Manager/AppChat.cs
new file mode 100644
index 0000000..4452a2c
--- /dev/null
+++ b/NoSugarNet.ClientCore/Manager/AppChat.cs
@@ -0,0 +1,30 @@
+using AxibugProtobuf;
+using NoSugarNet.ClientCore.Common;
+using NoSugarNet.ClientCore.Event;
+using NoSugarNet.ClientCore.Network;
+
+namespace NoSugarNet.ClientCore.Manager
+{
+ public class AppChat
+ {
+ public AppChat()
+ {
+ NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdChatmsg, RecvChatMsg);
+ }
+
+ public void SendChatMsg(string ChatMsg)
+ {
+ Protobuf_ChatMsg msg = new Protobuf_ChatMsg()
+ {
+ ChatMsg = ChatMsg,
+ };
+ App.networkHelper.SendToServer((int)CommandID.CmdChatmsg, ProtoBufHelper.Serizlize(msg));
+ }
+
+ public void RecvChatMsg(byte[] reqData)
+ {
+ Protobuf_ChatMsg_RESP msg = ProtoBufHelper.DeSerizlize(reqData);
+ EventSystem.Instance.PostEvent(EEvent.OnChatMsg, msg.NickName, msg.ChatMsg);
+ }
+ }
+}
diff --git a/NoSugarNet.ClientCore/Manager/AppLocalClient.cs b/NoSugarNet.ClientCore/Manager/AppLocalClient.cs
new file mode 100644
index 0000000..133134e
--- /dev/null
+++ b/NoSugarNet.ClientCore/Manager/AppLocalClient.cs
@@ -0,0 +1,225 @@
+using AxibugProtobuf;
+using NoSugarNet.ClientCore.Network;
+using Google.Protobuf;
+using System.Net.Sockets;
+using NoSugarNet.ClientCore.Common;
+using NoSugarNet.ClientCore;
+using static System.Runtime.InteropServices.JavaScript.JSType;
+using NoSugarNet.ClientCore.Manager;
+using System.Net;
+
+namespace ServerCore.Manager
+{
+ public class AppLocalClient
+ {
+
+ Dictionary mDictTunnelID2Cfg = new Dictionary();
+ Dictionary mDictTunnelID2Listeners = new Dictionary();
+ CompressAdapter mCompressAdapter;
+
+ public AppLocalClient()
+ {
+ //初始化压缩适配器,暂时使用0,代表压缩类型
+ mCompressAdapter = new CompressAdapter(0);
+ //注册网络消息
+ NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdCfgs, Recive_CmdCfgs);
+ NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdTunnelS2CConnect, Recive_TunnelS2CConnect);
+ NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdTunnelS2CDisconnect, Recive_TunnelS2CDisconnect);
+ NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdTunnelS2CData, Recive_TunnelS2CData);
+ }
+
+ ///
+ /// 初始化连接,先获取到配置
+ ///
+ void InitListenerMode()
+ {
+ foreach (var cfg in mDictTunnelID2Cfg)
+ {
+ LocalListener listener = new LocalListener(1024, 1024, cfg.Key);
+ listener.Init();
+ listener.Start(new IPEndPoint(IPAddress.Any.Address, (int)cfg.Value.Port));
+ AddLocalListener(listener);
+ }
+ }
+
+ #region 连接字典管理
+ ///
+ /// 追加监听者
+ ///
+ ///
+ ///
+ void AddLocalListener(LocalListener _listener)
+ {
+ lock (mDictTunnelID2Listeners)
+ {
+ mDictTunnelID2Listeners[_listener.mTunnelID] = _listener;
+ }
+ }
+
+ ///
+ /// 删除监听
+ ///
+ ///
+ ///
+ void RemoveLocalListener(LocalListener _listener)
+ {
+ lock (mDictTunnelID2Listeners)
+ {
+ if (mDictTunnelID2Listeners.ContainsKey(_listener.mTunnelID))
+ {
+ mDictTunnelID2Listeners[_listener.mTunnelID] = _listener;
+ }
+ }
+ }
+
+ bool GetLocalListener(byte tunnelId,out LocalListener _listener)
+ {
+ _listener = null;
+ if (!mDictTunnelID2Listeners.ContainsKey(tunnelId))
+ return false;
+
+ _listener = mDictTunnelID2Listeners[tunnelId];
+ return true;
+ }
+ #endregion
+
+ #region 解析服务端下行数据
+ public void Recive_CmdCfgs(byte[] reqData)
+ {
+ App.log.Debug("Recive_CmdCfgs");
+ Protobuf_Cfgs msg = ProtoBufHelper.DeSerizlize(reqData);
+
+ for (int i = 0;msg.Cfgs.Count > 0;i++)
+ {
+ Protobuf_Cfgs_Single cfg = msg.Cfgs[i];
+ mDictTunnelID2Cfg[(byte)cfg.TunnelID] = cfg;
+ }
+ InitListenerMode();
+ }
+
+ public void Recive_TunnelS2CConnect(byte[] reqData)
+ {
+ App.log.Debug("Recive_TunnelS2CConnect");
+ Protobuf_S2C_Connect msg = ProtoBufHelper.DeSerizlize(reqData);
+ OnServerLocalConnect((byte)msg.TunnelID,(byte)msg.Idx);
+ }
+ public void Recive_TunnelS2CDisconnect(byte[] reqData)
+ {
+ App.log.Debug("Recive_TunnelS2CDisconnect");
+ Protobuf_S2C_Disconnect msg = ProtoBufHelper.DeSerizlize(reqData);
+ OnServerLocalDisconnect((byte)msg.TunnelID,(byte)msg.Idx);
+ }
+ public void Recive_TunnelS2CData(byte[] reqData)
+ {
+ App.log.Debug("Recive_TunnelS2CData");
+ Protobuf_S2C_DATA msg = ProtoBufHelper.DeSerizlize(reqData);
+ OnServerLocalDataCallBack((byte)msg.TunnelID,(byte)msg.Idx, msg.HunterNetCoreData.ToArray());
+ }
+ #endregion
+
+ #region 两端本地端口连接事件通知
+ ///
+ /// 当客户端本地端口连接
+ ///
+ ///
+ ///
+ public void OnClientLocalConnect(byte tunnelId,byte _Idx)
+ {
+ if (!mDictTunnelID2Cfg.ContainsKey(tunnelId))
+ return;
+
+ byte[] respData = ProtoBufHelper.Serizlize(new Protobuf_C2S_Connect()
+ {
+ TunnelID = tunnelId,
+ Idx = _Idx,
+ });
+
+ //告知给服务端,来自客户端本地的连接建立
+ App.networkHelper.SendToServer((int)CommandID.CmdTunnelC2SConnect, respData);
+ }
+
+ ///
+ /// 当客户端本地端口连接断开
+ ///
+ ///
+ ///
+ public void OnClientLocalDisconnect(byte tunnelId, byte _Idx)
+ {
+ //隧道ID定位投递服务端本地连接
+ if (!mDictTunnelID2Cfg.ContainsKey(tunnelId))
+ return;
+
+ byte[] respData = ProtoBufHelper.Serizlize(new Protobuf_C2S_Disconnect()
+ {
+ TunnelID = tunnelId,
+ Idx= _Idx,
+ });
+ //告知给服务端,来自客户端本地的连接断开
+ App.networkHelper.SendToServer((int)CommandID.CmdTunnelC2SDisconnect, respData);
+ }
+
+ ///
+ /// 当服务端本地端口连接
+ ///
+ ///
+ public void OnServerLocalConnect(byte tunnelId,byte Idx)
+ {
+ if (!GetLocalListener(tunnelId, out LocalListener _listener))
+ return;
+ //TODO 维护本地状态
+ }
+
+ ///
+ /// 当服务端本地端口连接断开
+ ///
+ ///
+ ///
+ public void OnServerLocalDisconnect(byte tunnelId, byte Idx)
+ {
+ if (!GetLocalListener(tunnelId, out LocalListener _listener))
+ return;
+ _listener.CloseConnectByIdx(Idx);
+ }
+
+ #endregion
+
+ #region 数据投递
+ ///
+ /// 来自服务端本地连接投递的Tunnel数据
+ ///
+ ///
+ ///
+ ///
+ public void OnServerLocalDataCallBack(byte tunnelId,byte Idx, byte[] data)
+ {
+ if (!GetLocalListener(tunnelId, out LocalListener _listener))
+ return;
+
+ //解压
+ data = mCompressAdapter.Decompress(data);
+ _listener.SendSocketByIdx(Idx,data);
+ }
+
+ ///
+ /// 来自客户端本地连接投递的Tunnel数据
+ ///
+ ///
+ ///
+ ///
+ public void OnClientTunnelDataCallBack(byte tunnelId,byte Idx, byte[] data)
+ {
+ //压缩
+ data = mCompressAdapter.Compress(data);
+ byte[] respData = ProtoBufHelper.Serizlize(new Protobuf_C2S_DATA()
+ {
+ TunnelID = tunnelId,
+ Idx = Idx,
+ HunterNetCoreData = ByteString.CopyFrom(data)
+ });
+
+ //投递给服务端,来自客户端本地的连接数据
+ App.networkHelper.SendToServer((int)CommandID.CmdTunnelC2SData, respData);
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/NoSugarNet.ClientCore/Manager/AppLogin.cs b/NoSugarNet.ClientCore/Manager/AppLogin.cs
new file mode 100644
index 0000000..a4498e6
--- /dev/null
+++ b/NoSugarNet.ClientCore/Manager/AppLogin.cs
@@ -0,0 +1,38 @@
+using AxibugProtobuf;
+using NoSugarNet.ClientCore.Common;
+using NoSugarNet.ClientCore.Network;
+
+namespace NoSugarNet.ClientCore.Manager
+{
+ public class AppLogin
+ {
+ public AppLogin()
+ {
+ NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdLogin, RecvLoginMsg);
+ }
+ public void Login(string Account)
+ {
+ Protobuf_Login msg = new Protobuf_Login()
+ {
+ LoginType = 0,
+ Account = Account,
+ };
+ App.networkHelper.SendToServer((int)CommandID.CmdLogin, ProtoBufHelper.Serizlize(msg));
+ }
+
+ public void RecvLoginMsg(byte[] reqData)
+ {
+ Protobuf_Login_RESP msg = ProtoBufHelper.DeSerizlize(reqData);
+ if (msg.Status == LoginResultStatus.Ok)
+ {
+ App.log.Debug("登录成功");
+ App.user.InitMainUserData(App.user.userdata.Account);
+ }
+ else
+ {
+ App.log.Debug("登录失败");
+ }
+ }
+
+ }
+}
diff --git a/NoSugarNet.ClientCore/Manager/LocalClient/LocalClient.cs b/NoSugarNet.ClientCore/Manager/LocalClient/LocalClient.cs
new file mode 100644
index 0000000..4236141
--- /dev/null
+++ b/NoSugarNet.ClientCore/Manager/LocalClient/LocalClient.cs
@@ -0,0 +1,74 @@
+//using HaoYueNet.ClientNetwork.OtherMode;
+
+//namespace NoSugarNet.ClientCore
+//{
+// ///
+// /// 继承网络库,以支持网络功能
+// ///
+// public class LocalClient : NetworkHelperCore_ListenerMode
+// {
+// public byte mTunnelID;
+// public LocalClient(byte TunnelID)
+// {
+// mTunnelID = TunnelID;
+// //指定接收服务器数据事件
+// OnReceiveData += GetDataCallBack;
+// //断开连接
+// OnClose += OnConnectClose;
+// OnConnected += NetworkConnected;
+// //网络库调试信息输出事件,用于打印网络内容
+// OnLogOut += NetworkDeBugLog;
+// }
+
+// public void NetworkConnected(bool IsConnect)
+// {
+// NetworkDeBugLog($"LocalListener_Connected:{IsConnect}");
+// if (IsConnect)
+// {
+// App.local.OnClientLocalConnect(mTunnelID,this);
+// }
+// else
+// {
+// //连接失败
+// NetworkDeBugLog("连接失败!");
+// }
+// }
+
+// public void NetworkDeBugLog(string str)
+// {
+// //用于Unity内的输出
+// //Debug.Log("NetCoreDebug >> "+str);
+// Console.WriteLine("LocalListener_Debug >> " + str);
+// }
+
+// ///
+// /// 接受包回调
+// ///
+// /// 协议ID
+// /// 错误编号
+// /// 业务数据
+// public void GetDataCallBack(byte[] data)
+// {
+// NetworkDeBugLog("收到消息 数据长度=>" + data.Length);
+// try
+// {
+// //抛出网络数据
+// App.local.OnClientTunnelDataCallBack(mTunnelID, data);
+// }
+// catch (Exception ex)
+// {
+// NetworkDeBugLog("逻辑处理错误:" + ex.ToString());
+// }
+
+// }
+
+// ///
+// /// 关闭连接
+// ///
+// public void OnConnectClose()
+// {
+// NetworkDeBugLog("LocalListener_OnConnectClose");
+// App.local.OnClientLocalDisconnect(mTunnelID,this);
+// }
+// }
+//}
diff --git a/NoSugarNet.ClientCore/Manager/LocalClient/LocalListener.cs b/NoSugarNet.ClientCore/Manager/LocalClient/LocalListener.cs
new file mode 100644
index 0000000..b58fda9
--- /dev/null
+++ b/NoSugarNet.ClientCore/Manager/LocalClient/LocalListener.cs
@@ -0,0 +1,187 @@
+using HaoYueNet.ServerNetwork;
+using NoSugarNet.ClientCore.Network;
+using System.Net.Sockets;
+using static System.Runtime.InteropServices.JavaScript.JSType;
+
+namespace NoSugarNet.ClientCore
+{
+ public class LocalListener : TcpSaeaServer_SourceMode
+ {
+ public byte mTunnelID;
+ public LocalListener(int numConnections, int receiveBufferSize, byte TunnelID)
+ : base(numConnections, receiveBufferSize)
+ {
+ OnClientNumberChange += ClientNumberChange;
+ OnReceive += ReceiveData;
+ OnDisconnected += OnDisconnect;
+ OnNetLog += OnShowNetLog;
+
+ mTunnelID = TunnelID;
+ }
+
+ private void ClientNumberChange(int num, AsyncUserToken token)
+ {
+ Console.WriteLine("Client数发生变化");
+ //增加连接数
+ if (num > 0)
+ {
+ int Idx = AddDictSocket(token.Socket);
+ if (GetSocketByIdx(Idx, out Socket _socket))
+ {
+ App.local.OnClientLocalConnect(mTunnelID, (byte)Idx);
+ }
+ }
+ }
+
+ ///
+ /// 通过下标发送
+ ///
+ ///
+ ///
+ public void SendSocketByIdx(int Idx, byte[] data)
+ {
+ if (GetSocketByIdx(Idx, out Socket _socket))
+ {
+ SendToSocket(_socket, data);
+ }
+ //TODO连接前缓存数据
+ }
+
+ ///
+ /// 接受包回调
+ ///
+ /// 协议ID
+ /// 错误编号
+ /// 业务数据
+ private void ReceiveData(AsyncUserToken token, byte[] data)
+ {
+ DataCallBack(token.Socket, data);
+ }
+
+ public void DataCallBack(Socket sk, byte[] data)
+ {
+ App.log.Debug("收到消息 数据长度=>" + data.Length);
+
+ if (!GetSocketIdxBySocket(sk, out int Idx))
+ return;
+ try
+ {
+ //抛出网络数据
+ App.local.OnClientTunnelDataCallBack(mTunnelID, (byte)Idx, data);
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine("逻辑处理错误:" + ex.ToString());
+ }
+ }
+
+ public void CloseConnectByIdx(byte Idx)
+ {
+ if (GetSocketByIdx(Idx, out Socket _socket))
+ {
+ _socket.Shutdown(SocketShutdown.Both);
+ }
+ }
+
+ ///
+ /// 断开连接
+ ///
+ ///
+ public void OnDisconnect(AsyncUserToken token)
+ {
+ Console.WriteLine("断开连接");
+
+ if (!GetSocketIdxBySocket(token.Socket, out int Idx))
+ return;
+
+ App.local.OnClientLocalConnect(mTunnelID, (byte)Idx);
+ RemoveDictSocket(token.Socket);
+ }
+
+ public void OnShowNetLog(string msg)
+ {
+ App.log.Debug(msg);
+ }
+
+ #region 一个轻量级无用户连接管理
+ Dictionary DictSocketHandle2Idx = new Dictionary();
+ Dictionary DictIdx2Socket = new Dictionary();
+ int mSeedIdx = 0;
+ List FreeIdxs = new List();
+ int GetNextIdx()
+ {
+ if (FreeIdxs.Count > 0)
+ {
+ int Idx = FreeIdxs[0];
+ FreeIdxs.RemoveAt(0);
+ return Idx;
+ }
+ return mSeedIdx++;
+ }
+
+ ///
+ /// 追加Socket返回下标
+ ///
+ ///
+ ///
+ public int AddDictSocket(Socket socket)
+ {
+ if (socket == null)
+ return -1;
+ lock (DictSocketHandle2Idx)
+ {
+ int Idx = GetNextIdx();
+ DictSocketHandle2Idx[socket.Handle] = Idx;
+ DictIdx2Socket[Idx] = socket;
+ return Idx;
+ }
+ }
+
+ public void RemoveDictSocket(Socket socket)
+ {
+ if (socket == null)
+ return;
+ lock (DictSocketHandle2Idx)
+ {
+ if (!DictSocketHandle2Idx.ContainsKey(socket.Handle))
+ return;
+ int Idx = DictSocketHandle2Idx[socket.Handle];
+ FreeIdxs.Add(Idx);
+ if (DictIdx2Socket.ContainsKey(Idx))
+ DictIdx2Socket.Remove(Idx);
+ DictSocketHandle2Idx.Remove(socket.Handle);
+ }
+ }
+
+ public bool GetSocketByIdx(int Idx, out Socket _socket)
+ {
+ if (!DictIdx2Socket.ContainsKey(Idx))
+ {
+ _socket = null;
+ return false;
+ }
+
+ _socket = DictIdx2Socket[Idx];
+ return true;
+ }
+
+ public bool GetSocketIdxBySocket(Socket _socket, out int Idx)
+ {
+ if (_socket == null)
+ {
+ Idx = -1;
+ return false;
+ }
+
+ if (!DictSocketHandle2Idx.ContainsKey(_socket.Handle))
+ {
+ Idx = -1;
+ return false;
+ }
+
+ Idx = DictSocketHandle2Idx[_socket.Handle];
+ return true;
+ }
+ #endregion
+ }
+}
diff --git a/NoSugarNet.ClientCore/Manager/LogManager.cs b/NoSugarNet.ClientCore/Manager/LogManager.cs
new file mode 100644
index 0000000..425878d
--- /dev/null
+++ b/NoSugarNet.ClientCore/Manager/LogManager.cs
@@ -0,0 +1,20 @@
+namespace NoSugarNet.ClientCore.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.ClientCore/Manager/UserDataManager.cs b/NoSugarNet.ClientCore/Manager/UserDataManager.cs
new file mode 100644
index 0000000..25c0a91
--- /dev/null
+++ b/NoSugarNet.ClientCore/Manager/UserDataManager.cs
@@ -0,0 +1,56 @@
+using AxibugProtobuf;
+
+namespace NoSugarNet.ClientCore.Manager
+{
+ public class UserDataBase
+ {
+ public long UID { get; set; }
+ public string Account { get; set; }
+ }
+
+ public class MainUserDataBase : UserDataBase
+ {
+ public bool IsLoggedIn { get; set; } = false;
+ }
+
+ public class UserDataManager
+ {
+ public UserDataManager()
+ {
+ //注册重连成功事件,以便后续自动登录
+ App.networkHelper.OnReConnected += OnReConnected;
+ }
+ public MainUserDataBase userdata { get;private set; } = new MainUserDataBase();
+ public bool IsLoggedIn => userdata.IsLoggedIn;
+
+ public void InitMainUserData(string UName)
+ {
+ userdata.Account = UName;
+ userdata.IsLoggedIn = true;
+ //以及其他数据初始化
+ //...
+ }
+
+ ///
+ /// 登出
+ ///
+ public void LoginOutData()
+ {
+ userdata.IsLoggedIn = false;
+ //以及其他数据清理
+ //...
+ }
+
+ ///
+ /// 当重连成功
+ ///
+ public void OnReConnected()
+ {
+ //如果之前已登录,则重新登录
+ if (userdata.IsLoggedIn)
+ {
+ App.login.Login(userdata.Account);
+ }
+ }
+ }
+}
diff --git a/NoSugarNet.ClientCore/Network/NetMsg.cs b/NoSugarNet.ClientCore/Network/NetMsg.cs
new file mode 100644
index 0000000..b6bb12a
--- /dev/null
+++ b/NoSugarNet.ClientCore/Network/NetMsg.cs
@@ -0,0 +1,94 @@
+namespace NoSugarNet.ClientCore.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 evt, Action callback)
+ {
+ Delegate tempDelegate = callback;
+ InterUnregisterCMD(evt, 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, byte[] arg)
+ {
+ List eventList = GetNetEventDicList(cmd);
+ if (eventList != null)
+ {
+ foreach (Delegate callback in eventList)
+ {
+ try
+ {
+ ((Action)callback)(arg);
+ }
+ catch (Exception e)
+ {
+ App.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.ClientCore/Network/NetworkHelper.cs b/NoSugarNet.ClientCore/Network/NetworkHelper.cs
new file mode 100644
index 0000000..17277fc
--- /dev/null
+++ b/NoSugarNet.ClientCore/Network/NetworkHelper.cs
@@ -0,0 +1,128 @@
+using AxibugProtobuf;
+using Google.Protobuf;
+using HaoYueNet.ClientNetwork;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace NoSugarNet.ClientCore.Network
+{
+ ///
+ /// 继承网络库,以支持网络功能
+ ///
+ public class NetworkHelper : NetworkHelperCore
+ {
+ public NetworkHelper()
+ {
+ //指定接收服务器数据事件
+ OnReceiveData += GetDataCallBack;
+ //断开连接
+ OnClose += OnConnectClose;
+ OnConnected += NetworkConnected;
+ //网络库调试信息输出事件,用于打印网络内容
+ OnLogOut += NetworkDeBugLog;
+ }
+
+ public delegate void OnReConnectedHandler();
+ ///
+ /// 重连成功事件
+ ///
+ public event OnReConnectedHandler OnReConnected;
+ ///
+ /// 是否自动重连
+ ///
+ public bool bAutoReConnect = false;
+ ///
+ /// 重连尝试时间
+ ///
+ const int ReConnectTryTime = 1000;
+
+ public void NetworkConnected(bool IsConnect)
+ {
+ NetworkDeBugLog($"NetworkConnected:{IsConnect}");
+ if (IsConnect)
+ {
+
+ }
+ else
+ {
+ //连接失败
+ NetworkDeBugLog("连接失败!");
+ //自动重连开关
+ if (bAutoReConnect)
+ ReConnect();
+ }
+ }
+
+ public void NetworkDeBugLog(string str)
+ {
+ //用于Unity内的输出
+ //Debug.Log("NetCoreDebug >> "+str);
+ Console.WriteLine("NetCoreDebug >> " + str);
+ }
+
+ ///
+ /// 接受包回调
+ ///
+ /// 协议ID
+ /// 错误编号
+ /// 业务数据
+ public void GetDataCallBack(int CMDID, int ERRCODE, byte[] data)
+ {
+ NetworkDeBugLog("收到消息 CMDID =>" + CMDID + " ERRCODE =>" + ERRCODE + " 数据长度=>" + data.Length);
+ try
+ {
+ //抛出网络数据
+ NetMsg.Instance.PostNetMsgEvent(CMDID, data);
+ }
+ catch (Exception ex)
+ {
+ NetworkDeBugLog("逻辑处理错误:" + ex.ToString());
+ }
+
+ }
+
+ ///
+ /// 关闭连接
+ ///
+ public void OnConnectClose()
+ {
+ NetworkDeBugLog("OnConnectClose");
+
+ //自动重连开关
+ if (bAutoReConnect)
+ ReConnect();
+ }
+
+
+ bool bInReConnecting = false;
+ ///
+ /// 自动重连
+ ///
+ void ReConnect()
+ {
+ if (bInReConnecting)
+ return;
+ bInReConnecting = true;
+
+ bool bflagDone = false;
+ do
+ {
+ //等待时间
+ Thread.Sleep(ReConnectTryTime);
+ App.log.Debug($"尝试自动重连{LastConnectIP}:{LastConnectPort}……");
+ //第一步
+ if (Init(LastConnectIP, LastConnectPort))
+ {
+ App.log.Debug($"自动重连成功!");
+ bflagDone = true;
+ App.log.Debug($"触发重连后的自动逻辑!");
+ OnReConnected?.Invoke();
+ }
+ } while (!bflagDone);
+ bInReConnecting = false;
+ }
+ }
+}
diff --git a/NoSugarNet.ClientCore/Protobuf/ProtobufNoSugar.cs b/NoSugarNet.ClientCore/Protobuf/ProtobufNoSugar.cs
new file mode 100644
index 0000000..44acd31
--- /dev/null
+++ b/NoSugarNet.ClientCore/Protobuf/ProtobufNoSugar.cs
@@ -0,0 +1,2972 @@
+//
+// 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",
+ "dXMiQwoNUHJvdG9idWZfQ2ZncxIyCgRjZmdzGAEgAygLMiQuQXhpYnVnUHJv",
+ "dG9idWYuUHJvdG9idWZfQ2Znc19TaW5nbGUiQgoUUHJvdG9idWZfQ2Znc19T",
+ "aW5nbGUSEAoIVHVubmVsSUQYASABKA0SCgoCSVAYAiABKAkSDAoEUG9ydBgD",
+ "IAEoBSIjChBQcm90b2J1Zl9DaGF0TXNnEg8KB0NoYXRNc2cYASABKAkiSAoV",
+ "UHJvdG9idWZfQ2hhdE1zZ19SRVNQEhAKCE5pY2tOYW1lGAEgASgJEg8KB0No",
+ "YXRNc2cYAiABKAkSDAoERGF0ZRgDIAEoAyI1ChRQcm90b2J1Zl9DMlNfQ29u",
+ "bmVjdBIQCghUdW5uZWxJRBgBIAEoDRILCgNJZHgYAiABKA0iNQoUUHJvdG9i",
+ "dWZfUzJDX0Nvbm5lY3QSEAoIVHVubmVsSUQYASABKA0SCwoDSWR4GAIgASgN",
+ "IjgKF1Byb3RvYnVmX0MyU19EaXNjb25uZWN0EhAKCFR1bm5lbElEGAEgASgN",
+ "EgsKA0lkeBgCIAEoDSI4ChdQcm90b2J1Zl9TMkNfRGlzY29ubmVjdBIQCghU",
+ "dW5uZWxJRBgBIAEoDRILCgNJZHgYAiABKA0iTgoRUHJvdG9idWZfQzJTX0RB",
+ "VEESEAoIVHVubmVsSUQYASABKA0SCwoDSWR4GAIgASgNEhoKEkh1bnRlck5l",
+ "dENvcmVfRGF0YRgDIAEoDCJOChFQcm90b2J1Zl9TMkNfREFUQRIQCghUdW5u",
+ "ZWxJRBgBIAEoDRILCgNJZHgYAiABKA0SGgoSSHVudGVyTmV0Q29yZV9EYXRh",
+ "GAMgASgMKvoBCglDb21tYW5kSUQSDgoKQ01EX0RFRkFVTBAAEg4KCUNNRF9M",
+ "T0dJThDRDxINCghDTURfQ0ZHUxC5FxIQCgtDTURfQ0hBVE1TRxChHxIbChZD",
+ "TURfVFVOTkVMX0MyU19DT05ORUNUEIgnEhsKFkNNRF9UVU5ORUxfUzJDX0NP",
+ "Tk5FQ1QQiScSHgoZQ01EX1RVTk5FTF9DMlNfRElTQ09OTkVDVBCKJxIeChlD",
+ "TURfVFVOTkVMX1MyQ19ESVNDT05ORUNUEIsnEhgKE0NNRF9UVU5ORUxfQzJT",
+ "X0RBVEEQjCcSGAoTQ01EX1RVTk5FTF9TMkNfREFUQRCNJyorCglFcnJvckNv",
+ "ZGUSEAoMRVJST1JfREVGQVVMEAASDAoIRVJST1JfT0sQASo+CglMb2dpblR5",
+ "cGUSDwoLQmFzZURlZmF1bHQQABIOCgpIYW9ZdWVBdXRoEAESBwoDQkYzEAMS",
+ "BwoDQkY0EAQqSwoKRGV2aWNlVHlwZRIWChJEZXZpY2VUeXBlX0RlZmF1bHQQ",
+ "ABIGCgJQQxABEgsKB0FuZHJvaWQQAhIHCgNJT1MQAxIHCgNQU1YQBCpOChFM",
+ "b2dpblJlc3VsdFN0YXR1cxIhCh1Mb2dpblJlc3VsdFN0YXR1c19CYXNlRGVm",
+ "YXVsdBAAEgYKAk9LEAESDgoKQWNjb3VudEVychACQgJIAWIGcHJvdG8z"));
+ 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_Cfgs), global::AxibugProtobuf.Protobuf_Cfgs.Parser, new[]{ "Cfgs" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Cfgs_Single), global::AxibugProtobuf.Protobuf_Cfgs_Single.Parser, new[]{ "TunnelID", "IP", "Port" }, 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", "Idx" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_S2C_Connect), global::AxibugProtobuf.Protobuf_S2C_Connect.Parser, new[]{ "TunnelID", "Idx" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_C2S_Disconnect), global::AxibugProtobuf.Protobuf_C2S_Disconnect.Parser, new[]{ "TunnelID", "Idx" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_S2C_Disconnect), global::AxibugProtobuf.Protobuf_S2C_Disconnect.Parser, new[]{ "TunnelID", "Idx" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_C2S_DATA), global::AxibugProtobuf.Protobuf_C2S_DATA.Parser, new[]{ "TunnelID", "Idx", "HunterNetCoreData" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_S2C_DATA), global::AxibugProtobuf.Protobuf_S2C_DATA.Parser, new[]{ "TunnelID", "Idx", "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_Cfgs
+ ///
+ [pbr::OriginalName("CMD_CFGS")] CmdCfgs = 3001,
+ ///
+ ///广播信息上行 | 下行 对应 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_Cfgs : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Cfgs());
+ 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_Cfgs() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Cfgs(Protobuf_Cfgs other) : this() {
+ cfgs_ = other.cfgs_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Cfgs Clone() {
+ return new Protobuf_Cfgs(this);
+ }
+
+ /// Field number for the "cfgs" field.
+ public const int CfgsFieldNumber = 1;
+ private static readonly pb::FieldCodec _repeated_cfgs_codec
+ = pb::FieldCodec.ForMessage(10, global::AxibugProtobuf.Protobuf_Cfgs_Single.Parser);
+ private readonly pbc::RepeatedField cfgs_ = new pbc::RepeatedField();
+ ///
+ ///配置
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField Cfgs {
+ get { return cfgs_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_Cfgs);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_Cfgs other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!cfgs_.Equals(other.cfgs_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= cfgs_.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
+ cfgs_.WriteTo(output, _repeated_cfgs_codec);
+ 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) {
+ cfgs_.WriteTo(ref output, _repeated_cfgs_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ size += cfgs_.CalculateSize(_repeated_cfgs_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_Cfgs other) {
+ if (other == null) {
+ return;
+ }
+ cfgs_.Add(other.cfgs_);
+ _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: {
+ cfgs_.AddEntriesFrom(input, _repeated_cfgs_codec);
+ 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: {
+ cfgs_.AddEntriesFrom(ref input, _repeated_cfgs_codec);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class Protobuf_Cfgs_Single : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Protobuf_Cfgs_Single());
+ 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_Cfgs_Single() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Cfgs_Single(Protobuf_Cfgs_Single other) : this() {
+ tunnelID_ = other.tunnelID_;
+ iP_ = other.iP_;
+ port_ = other.port_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Protobuf_Cfgs_Single Clone() {
+ return new Protobuf_Cfgs_Single(this);
+ }
+
+ /// Field number for the "TunnelID" field.
+ public const int TunnelIDFieldNumber = 1;
+ private uint tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ /// Field number for the "IP" field.
+ public const int IPFieldNumber = 2;
+ private string iP_ = "";
+ ///
+ ///IP
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string IP {
+ get { return iP_; }
+ set {
+ iP_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "Port" field.
+ public const int PortFieldNumber = 3;
+ private int port_;
+ ///
+ ///端口
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Port {
+ get { return port_; }
+ set {
+ port_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Protobuf_Cfgs_Single);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Protobuf_Cfgs_Single other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (TunnelID != other.TunnelID) return false;
+ if (IP != other.IP) return false;
+ if (Port != other.Port) 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 (IP.Length != 0) hash ^= IP.GetHashCode();
+ if (Port != 0) hash ^= Port.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.WriteUInt32(TunnelID);
+ }
+ if (IP.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(IP);
+ }
+ if (Port != 0) {
+ output.WriteRawTag(24);
+ output.WriteInt32(Port);
+ }
+ 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.WriteUInt32(TunnelID);
+ }
+ if (IP.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(IP);
+ }
+ if (Port != 0) {
+ output.WriteRawTag(24);
+ output.WriteInt32(Port);
+ }
+ 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.ComputeUInt32Size(TunnelID);
+ }
+ if (IP.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(IP);
+ }
+ if (Port != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Port);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Protobuf_Cfgs_Single other) {
+ if (other == null) {
+ return;
+ }
+ if (other.TunnelID != 0) {
+ TunnelID = other.TunnelID;
+ }
+ if (other.IP.Length != 0) {
+ IP = other.IP;
+ }
+ if (other.Port != 0) {
+ Port = other.Port;
+ }
+ _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.ReadUInt32();
+ break;
+ }
+ case 18: {
+ IP = input.ReadString();
+ break;
+ }
+ case 24: {
+ Port = 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.ReadUInt32();
+ break;
+ }
+ case 18: {
+ IP = input.ReadString();
+ break;
+ }
+ case 24: {
+ Port = input.ReadInt32();
+ 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[4]; }
+ }
+
+ [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[5]; }
+ }
+
+ [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[6]; }
+ }
+
+ [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_;
+ idx_ = other.idx_;
+ _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 uint tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ /// Field number for the "Idx" field.
+ public const int IdxFieldNumber = 2;
+ private uint idx_;
+ ///
+ ///单个隧道连接下标
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Idx {
+ get { return idx_; }
+ set {
+ idx_ = 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;
+ if (Idx != other.Idx) 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 (Idx != 0) hash ^= Idx.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.WriteUInt32(TunnelID);
+ }
+ if (Idx != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Idx);
+ }
+ 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.WriteUInt32(TunnelID);
+ }
+ if (Idx != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Idx);
+ }
+ 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.ComputeUInt32Size(TunnelID);
+ }
+ if (Idx != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Idx);
+ }
+ 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;
+ }
+ if (other.Idx != 0) {
+ Idx = other.Idx;
+ }
+ _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.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Idx = input.ReadUInt32();
+ 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.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Idx = input.ReadUInt32();
+ 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[7]; }
+ }
+
+ [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_;
+ idx_ = other.idx_;
+ _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 uint tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ /// Field number for the "Idx" field.
+ public const int IdxFieldNumber = 2;
+ private uint idx_;
+ ///
+ ///单个隧道连接下标
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Idx {
+ get { return idx_; }
+ set {
+ idx_ = 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;
+ if (Idx != other.Idx) 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 (Idx != 0) hash ^= Idx.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.WriteUInt32(TunnelID);
+ }
+ if (Idx != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Idx);
+ }
+ 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.WriteUInt32(TunnelID);
+ }
+ if (Idx != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Idx);
+ }
+ 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.ComputeUInt32Size(TunnelID);
+ }
+ if (Idx != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Idx);
+ }
+ 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;
+ }
+ if (other.Idx != 0) {
+ Idx = other.Idx;
+ }
+ _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.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Idx = input.ReadUInt32();
+ 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.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Idx = input.ReadUInt32();
+ 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[8]; }
+ }
+
+ [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_;
+ idx_ = other.idx_;
+ _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 uint tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ /// Field number for the "Idx" field.
+ public const int IdxFieldNumber = 2;
+ private uint idx_;
+ ///
+ ///单个隧道连接下标
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Idx {
+ get { return idx_; }
+ set {
+ idx_ = 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;
+ if (Idx != other.Idx) 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 (Idx != 0) hash ^= Idx.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.WriteUInt32(TunnelID);
+ }
+ if (Idx != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Idx);
+ }
+ 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.WriteUInt32(TunnelID);
+ }
+ if (Idx != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Idx);
+ }
+ 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.ComputeUInt32Size(TunnelID);
+ }
+ if (Idx != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Idx);
+ }
+ 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;
+ }
+ if (other.Idx != 0) {
+ Idx = other.Idx;
+ }
+ _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.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Idx = input.ReadUInt32();
+ 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.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Idx = input.ReadUInt32();
+ 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[9]; }
+ }
+
+ [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_;
+ idx_ = other.idx_;
+ _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 uint tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ /// Field number for the "Idx" field.
+ public const int IdxFieldNumber = 2;
+ private uint idx_;
+ ///
+ ///单个隧道连接下标
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Idx {
+ get { return idx_; }
+ set {
+ idx_ = 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;
+ if (Idx != other.Idx) 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 (Idx != 0) hash ^= Idx.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.WriteUInt32(TunnelID);
+ }
+ if (Idx != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Idx);
+ }
+ 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.WriteUInt32(TunnelID);
+ }
+ if (Idx != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Idx);
+ }
+ 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.ComputeUInt32Size(TunnelID);
+ }
+ if (Idx != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Idx);
+ }
+ 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;
+ }
+ if (other.Idx != 0) {
+ Idx = other.Idx;
+ }
+ _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.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Idx = input.ReadUInt32();
+ 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.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Idx = input.ReadUInt32();
+ 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[10]; }
+ }
+
+ [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_;
+ idx_ = other.idx_;
+ 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 uint tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ /// Field number for the "Idx" field.
+ public const int IdxFieldNumber = 2;
+ private uint idx_;
+ ///
+ ///单个隧道连接下标
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Idx {
+ get { return idx_; }
+ set {
+ idx_ = value;
+ }
+ }
+
+ /// Field number for the "HunterNetCore_Data" field.
+ public const int HunterNetCoreDataFieldNumber = 3;
+ 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 (Idx != other.Idx) 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 (Idx != 0) hash ^= Idx.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.WriteUInt32(TunnelID);
+ }
+ if (Idx != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Idx);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ output.WriteRawTag(26);
+ 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.WriteUInt32(TunnelID);
+ }
+ if (Idx != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Idx);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ output.WriteRawTag(26);
+ 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.ComputeUInt32Size(TunnelID);
+ }
+ if (Idx != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Idx);
+ }
+ 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.Idx != 0) {
+ Idx = other.Idx;
+ }
+ 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.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Idx = input.ReadUInt32();
+ break;
+ }
+ case 26: {
+ 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.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Idx = input.ReadUInt32();
+ break;
+ }
+ case 26: {
+ 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[11]; }
+ }
+
+ [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_;
+ idx_ = other.idx_;
+ 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 uint tunnelID_;
+ ///
+ ///TunnelID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint TunnelID {
+ get { return tunnelID_; }
+ set {
+ tunnelID_ = value;
+ }
+ }
+
+ /// Field number for the "Idx" field.
+ public const int IdxFieldNumber = 2;
+ private uint idx_;
+ ///
+ ///单个隧道连接下标
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Idx {
+ get { return idx_; }
+ set {
+ idx_ = value;
+ }
+ }
+
+ /// Field number for the "HunterNetCore_Data" field.
+ public const int HunterNetCoreDataFieldNumber = 3;
+ 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 (Idx != other.Idx) 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 (Idx != 0) hash ^= Idx.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.WriteUInt32(TunnelID);
+ }
+ if (Idx != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Idx);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ output.WriteRawTag(26);
+ 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.WriteUInt32(TunnelID);
+ }
+ if (Idx != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(Idx);
+ }
+ if (HunterNetCoreData.Length != 0) {
+ output.WriteRawTag(26);
+ 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.ComputeUInt32Size(TunnelID);
+ }
+ if (Idx != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Idx);
+ }
+ 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.Idx != 0) {
+ Idx = other.Idx;
+ }
+ 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.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Idx = input.ReadUInt32();
+ break;
+ }
+ case 26: {
+ 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.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Idx = input.ReadUInt32();
+ break;
+ }
+ case 26: {
+ HunterNetCoreData = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code