public void UnRegisterHandle(DelegateEnums.NoneParam onHeartBeatHandler, ChkEnablePkg chkSendPkg, ChkEnablePkg chkRecvPkg, OnPkgError pkhError) { m_networkHeartBeat.UnRegisterNetConnect(onHeartBeatHandler); m_networkTimeoutMonitor.UnRegisterNetConnector(onHeartBeatHandler); onApplicationWakeupSendHeartbeat -= onHeartBeatHandler; onChkSendPkg -= chkSendPkg; onChkRecvPkg -= chkRecvPkg; onPkgError -= pkhError; }
/// <summary> /// 注册心跳发包句柄 /// </summary> /// <param name="onHeartBeatHandler"></param> public void RegisterHandle(DelegateEnums.NoneParam onHeartBeatHandler, ChkEnablePkg chkSendPkg, ChkEnablePkg chkRecvPkg = null, OnPkgError pkhError = null) { m_networkHeartBeat.RegisterNetConnector(this, m_protoUtil, onHeartBeatHandler); m_networkTimeoutMonitor.RegisterNetConnector(this, onHeartBeatHandler); onApplicationWakeupSendHeartbeat += onHeartBeatHandler; onChkSendPkg += chkSendPkg; onChkRecvPkg += chkRecvPkg; onPkgError += pkhError; }