private void btnConnect_Click(object sender, EventArgs e) { client = new ArtalkXmppClient(txtServer.Text, txtUsername.Text, txtPassword.Text); client.Message += OnNewMessage; client.Connect(); btnConnect.Enabled = false; btnDisconnect.Enabled = true; }
// 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()); }
private void ConnectToServer(string xmppHostname, string sniperId, string sniperPassword) { client = new ArtalkXmppClient(xmppHostname, sniperId, sniperPassword); client.Message += OnNewMessage; client.Connect(); }
internal void StartSellingItem() { client.Connect(); }