public void Disconnect() { if (this.fClient is IDisposable) { this.fClient.Dispose(); } this.fClient = null; this.fConnected = false; }
public void Connect() { if (this.fConnected) { this.Disconnect(); } this.fClient = new StompClient(this.Target, this.Port, Username, Password); this.fClient.HaveMessage += new Action<StompMessage>(this.fClient_HaveMessage); this.fClient.StartReadMessage(); this.fConnected = true; }
public void Connect() { if (this.fConnected) { this.Disconnect(); } this.fClient = new StompClient(this.Target, this.Port, Username, Password); this.fClient.HaveMessage += new Action <StompMessage>(this.fClient_HaveMessage); this.fClient.StartReadMessage(); this.fConnected = true; }