From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- Client/Assets/Scripts/XMainClient/LuaNetNode.cs | 54 +++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/LuaNetNode.cs (limited to 'Client/Assets/Scripts/XMainClient/LuaNetNode.cs') diff --git a/Client/Assets/Scripts/XMainClient/LuaNetNode.cs b/Client/Assets/Scripts/XMainClient/LuaNetNode.cs new file mode 100644 index 00000000..a6f3a19a --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/LuaNetNode.cs @@ -0,0 +1,54 @@ +using System; +using XUtliPoolLib; + +namespace XMainClient +{ + public class LuaNetNode + { + public bool isRpc = false; + + public uint type; + + public uint tagID; + + public bool isOnlyLua = false; + + public byte[] buffer; + + public int length; + + public bool copyBuffer = true; + + public DelLuaRespond resp; + + public DelLuaError err; + + public void SetBuff(byte[] buf, int length) + { + bool flag = buf != null && length > 0 && this.buffer != null; + if (flag) + { + for (int i = 0; i < this.buffer.Length; i++) + { + this.buffer[i] = 0; + } + bool flag2 = buf != null; + if (flag2) + { + Array.Copy(buf, this.buffer, length); + } + this.length = length; + } + } + + public void Reset() + { + this.isRpc = false; + this.type = 0u; + this.tagID = 0u; + this.length = 0; + this.resp = null; + this.err = null; + } + } +} -- cgit v1.1-26-g67d0