From afc980c9bf72c0fdf47bbb8ef9819b9493a07faf Mon Sep 17 00:00:00 2001 From: ALEXTANG <574809918@qq.com> Date: Tue, 24 May 2022 14:38:32 +0800 Subject: [PATCH] Update GameClient.cs --- .../src/TEngineCore/Net/GameClient.cs | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/TEngineHotUpdate/src/TEngineCore/Net/GameClient.cs b/TEngineHotUpdate/src/TEngineCore/Net/GameClient.cs index 170231fc..09c51c4f 100644 --- a/TEngineHotUpdate/src/TEngineCore/Net/GameClient.cs +++ b/TEngineHotUpdate/src/TEngineCore/Net/GameClient.cs @@ -23,16 +23,6 @@ namespace TEngineCore.Net { #region Propriety - - #region TimeOutCheck - private const int CHECK_TIMEOUT_PERFRAME = 10; - const int MAX_MSG_HANDLE = 256; - UInt32 m_dwLastCheckIndex = 0; - CsMsgDelegate[] m_aMsgHandles = new CsMsgDelegate[MAX_MSG_HANDLE]; - float[] m_fMsgRegTime = new float[MAX_MSG_HANDLE]; - private float m_timeout = 15; - #endregion - private string m_lastHost = null; private int m_lastPort = 0; private GameClientStatus m_status = GameClientStatus.StatusInit; @@ -415,6 +405,14 @@ namespace TEngineCore.Net #region 超时检测 + #region TimeOutCheck + private const int CHECK_TIMEOUT_PERFRAME = 10; + const int MAX_MSG_HANDLE = 256; + UInt32 m_dwLastCheckIndex = 0; + CsMsgDelegate[] m_aMsgHandles = new CsMsgDelegate[MAX_MSG_HANDLE]; + float[] m_fMsgRegTime = new float[MAX_MSG_HANDLE]; + private float m_timeout = 15; + #endregion private readonly MainPack _timeOutPack = new MainPack { Returncode = ReturnCode.MsgTimeOut }; private void CheckCsMsgTimeOut() { @@ -481,8 +479,6 @@ namespace TEngineCore.Net UInt32 hashIndex = (uint)pack.Actioncode % MAX_MSG_HANDLE; - m_aMsgHandles[hashIndex](null); - RmvCheckCsMsg((int)hashIndex); } }