关于openfire 和 agsxmpp 客户端的连接问题
- C# code
private void btnLogin_Click(object sender, EventArgs e) { Jid jid = new Jid(txtJid.Text); //用户名@服务器名 conn.Username = jid.User; conn.Server = jid.Server; conn.Password = txtPassword.Text; conn.Port = 5222; conn.UseCompression = false; conn.KeepAlive = true; conn.AutoRoster = true; conn.AutoPresence = true; conn.UseStartTLS = true; conn.AutoResolveConnectServer = false; conn.ConnectServer = "localhost"; this.DialogResult = DialogResult.OK; this.Close(); }
为什么就是无法连接呢?
可以成功连接gtalk服务器。
openfire服务器用spark可以成功连接。
[解决办法]
有一个握手时间要考虑进去~