From 400f799f7e8152e2509948157300a61658bb3bf5 Mon Sep 17 00:00:00 2001 From: Fuhaifeng Date: Tue, 22 Dec 2020 10:30:56 +0800 Subject: [PATCH] Review of SocletClient... --- .../Scripts/Network/SocketClient.cs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Assets/LuaFramework/Scripts/Network/SocketClient.cs b/Assets/LuaFramework/Scripts/Network/SocketClient.cs index 02534b6f2c..d8d79bdeee 100644 --- a/Assets/LuaFramework/Scripts/Network/SocketClient.cs +++ b/Assets/LuaFramework/Scripts/Network/SocketClient.cs @@ -427,10 +427,10 @@ public class SocketClient bool testConnect; public void Update() { - // FHF DEBUG + // FHF DEBUG //TimeSpan ts1 = Process.GetCurrentProcess().TotalProcessorTime; - System.Diagnostics.Stopwatch stw = new System.Diagnostics.Stopwatch(); - stw.Start(); + //System.Diagnostics.Stopwatch stw = new System.Diagnostics.Stopwatch(); + //stw.Start(); @@ -492,12 +492,12 @@ public class SocketClient if ((testConnect || !IsConnected()) && m_isConnected) { - Disconnect("TESTL"); + Disconnect("TEST"); } - - stw.Stop(); + //FHF Debug time preform + // stw.Stop(); // if(_CCC>0) // UnityEngine.Debug.Log("NET EVENT HANDLE: " + _CCC.ToString()+"@"+(stw.ElapsedTicks).ToString()); } @@ -517,10 +517,7 @@ public class SocketClient Util.CallMethod("SocketManager", "ReceiveClientHeartBeat", this, msg); return; } - if(msgId==10601) - { - Debug.Log("11"); - } + //处理错误码 if (_event.result == 0) { @@ -781,7 +778,7 @@ public class SocketClient buffer.Close(); - UnityEngine.Debug.Log("SocketClient.m_SendMessage..."+ msgId); + //UnityEngine.Debug.Log("SocketClient.m_SendMessage..."+ msgId); } ///