mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
Update GameClient.cs
This commit is contained in:
@@ -23,16 +23,6 @@ namespace TEngineCore.Net
|
|||||||
{
|
{
|
||||||
|
|
||||||
#region Propriety
|
#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 string m_lastHost = null;
|
||||||
private int m_lastPort = 0;
|
private int m_lastPort = 0;
|
||||||
private GameClientStatus m_status = GameClientStatus.StatusInit;
|
private GameClientStatus m_status = GameClientStatus.StatusInit;
|
||||||
@@ -415,6 +405,14 @@ namespace TEngineCore.Net
|
|||||||
|
|
||||||
#region 超时检测
|
#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 readonly MainPack _timeOutPack = new MainPack { Returncode = ReturnCode.MsgTimeOut };
|
||||||
private void CheckCsMsgTimeOut()
|
private void CheckCsMsgTimeOut()
|
||||||
{
|
{
|
||||||
@@ -481,8 +479,6 @@ namespace TEngineCore.Net
|
|||||||
|
|
||||||
UInt32 hashIndex = (uint)pack.Actioncode % MAX_MSG_HANDLE;
|
UInt32 hashIndex = (uint)pack.Actioncode % MAX_MSG_HANDLE;
|
||||||
|
|
||||||
m_aMsgHandles[hashIndex](null);
|
|
||||||
|
|
||||||
RmvCheckCsMsg((int)hashIndex);
|
RmvCheckCsMsg((int)hashIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user