/// <summary> /// Nothrow guarantee. /// </summary> public void Disconnect() { connected = false; terminated = true; VNCStream s = vncStream; vncStream = null; if (s != null) { s.Close(); } }
internal void connect(Stream stream, char[] password) { Program.AssertOnEventThread(); this.vncStream = new VNCStream(this, stream, helperIsPaused); this.vncStream.ErrorOccurred += this.OnError; this.vncStream.ConnectionSuccess += this.vncStream_ConnectionSuccess; this.connected = true; this.vncStream.connect(password); }