public void Release() { State = EState.Released; if (mUseInternalBroadcastLogic) { mBroadcastUdpClient.Close(); mBroadcastUdpClient.Dispose(); mUDPBoxBroadcast?.ReleaseThread(); } UDPBox.UnregistMessageIntercept(InterceptAndUpdateConnectState); UDPBox.UnregistWorkThreadOperate(RefreshConnectStateInWorkThread); UDPBox.Dispose(); }
void OnDisable() { mUDPBoxConnect.Dispose(); mUDPBoxBroadcast.ReleaseThread(); }
void OnDisable() { mUDPBox1.Dispose(); mUDPBox2.Dispose(); }