/// <summary> /// 关闭心跳 /// </summary> public void CloseHeart() { if (timer != null) { timer.Dispose(); timer = null; } }
public void Dispose() { soc.Disconnect(true); soc.Dispose(); server.Abort(); Instance = null; for (int i = 0; i < tCount; i++) { linkBuff[i].running = false; } if (threadTimer != null) { threadTimer.Dispose(); } }
public void Dispose() { #if !UNITY_WSA soc.Disconnect(true); #endif soc.Dispose(); Instance = null; for (int i = 0; i < tCount; i++) { linkBuff[i].running = false; } if (threadTimer != null) { threadTimer.Dispose(); } }