// GET: Home public ActionResult Index() { string hostname = "192.168.43.170"; string username = "******"; string password = "******"; using (ArtalkXmppClient client = new ArtalkXmppClient(hostname, username, password)) { // Setup any event handlers. // ... client.Connect(); client.Dispose(); Console.WriteLine("Type 'quit' to exit."); while (Console.ReadLine() != "quit") { ; } } return(View()); }
internal void Stop() { client.Message -= OnNewMessage; client.Dispose(); }
private void btnDisconnect_Click(object sender, EventArgs e) { client.Dispose(); btnConnect.Enabled = true; btnDisconnect.Enabled = false; }