예제 #1
0
        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;
        }
예제 #2
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());
        }
예제 #3
0
 private void ConnectToServer(string xmppHostname, string sniperId, string sniperPassword)
 {
     client          = new ArtalkXmppClient(xmppHostname, sniperId, sniperPassword);
     client.Message += OnNewMessage;
     client.Connect();
 }
예제 #4
0
 internal void StartSellingItem()
 {
     client.Connect();
 }