public void Release() { State = EState.Released; if (mUseInternalBroadcastLogic) { mBroadcastUdpClient.Close(); mBroadcastUdpClient.Dispose(); mUDPBoxBroadcast?.ReleaseThread(); } UDPBox.UnregistMessageIntercept(InterceptAndUpdateConnectState); UDPBox.UnregistWorkThreadOperate(RefreshConnectStateInWorkThread); UDPBox.Dispose(); }
public void Release() { mUdpBox.OnSendMessage -= OnSendMessage; mUdpBox.UnregistMessageIntercept(OnACKMessageIntercept); mUdpBox.UnregistWorkThreadOperate(ACKWaitPackageLogicUpdate); }