private void stop() { Interlocked.Exchange(ref bWorkThread, -1); while (bReadyExit == false) { ; } mClient.cmdExit(); mClient.disconnect(); }
public void disconnect() { if (bOpen == false) { return; } bOpen = false; Interlocked.Exchange(ref bWorkThread, -1); while (bReadyExit == false) { ; } mClient.cmdExit(); mClient.disconnect(); }