Пример #1
0
        // 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());
        }
Пример #2
0
 internal void Stop()
 {
     client.Message -= OnNewMessage;
     client.Dispose();
 }
Пример #3
0
 private void btnDisconnect_Click(object sender, EventArgs e)
 {
     client.Dispose();
     btnConnect.Enabled    = true;
     btnDisconnect.Enabled = false;
 }