private void Stop() { lock (this) { if (!Connected) { return; } Connected = false; if (OnDisconnect != null) { OnDisconnect(this); } Streams.Close(); } }