diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/NetEvent.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/NetEvent.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/NetEvent.cs | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/NetEvent.cs b/Client/Assets/Scripts/XMainClient/NetEvent.cs new file mode 100644 index 00000000..1600701c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/NetEvent.cs @@ -0,0 +1,57 @@ +using System;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ public class NetEvent : INetEventData, ILuaNetEventData
+ {
+ public Protocol protocol { get; set; }
+
+ public Rpc rpc { get; set; }
+
+ public LuaNetNode node { get; set; }
+
+ public NetEvtType m_nEvtType;
+
+ public SmallBuffer<byte> m_oBuffer;
+
+ public bool m_bSuccess;
+
+ public NetErrCode m_nErrCode;
+
+ public int m_nBufferLength;
+
+ public int m_SocketID;
+
+ public long m_oTime;
+
+ public bool IsPtc = false;
+
+ public bool IsOnlyLua = false;
+
+ public NetEvent()
+ {
+ this.Reset();
+ }
+
+ public void Reset()
+ {
+ this.m_nEvtType = NetEvtType.Event_Connect;
+ this.m_oBuffer.SetInvalid();
+ this.m_bSuccess = true;
+ this.m_oTime = DateTime.Now.Ticks;
+ this.m_nErrCode = NetErrCode.Net_NoError;
+ this.m_nBufferLength = 0;
+ this.m_SocketID = 0;
+ this.IsOnlyLua = false;
+ this.protocol = null;
+ this.rpc = null;
+ this.node = null;
+ }
+
+ public void ManualReturnProtocol()
+ {
+ this.protocol = null;
+ }
+ }
+}
|