Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Use asgXmpp to connect to my openfire server failure
- protected void Unnamed1_Click(object sender, EventArgs e)
- {
- XmppClientConnection xmpp;
- xmpp = (XmppClientConnection)Application["xmpp"];
- if (xmpp == null)
- {
- xmpp = new XmppClientConnection();
- Application["xmpp"] = xmpp;
- }
- xmpp.OnLogin += new ObjectHandler(xmpp_OnLogin);
- Jid jid = new Jid("ttt@192.168.1.131");
- xmpp.AutoPresence = true;
- xmpp.AutoResolveConnectServer = true;
- xmpp.Port = 5222;
- xmpp.UseSSL = false;
- xmpp.Server = jid.Server;
- xmpp.Username = "test@jh";
- xmpp.Password = "123456";
- xmpp.ClientVersion = "1.0";
- xmpp.SendMyPresence();
- xmpp.Open();
- }
- void xmpp_OnLogin(object sender)
- {
- Console.WriteLine();
- }
Add Comment
Please, Sign In to add comment