我有自己的 xmpp 服务器。在:jenan.cz
为什么我无法通过 WebClient 连接?
错误:状态CONNFAIL
应用程序在这里:http: //jenan.cz/xmpp/
连接:http: //jenan.cz/xmpp/gab.js
我使用以下连接:
$(document).bind('connect', function (ev, data) {
var conn = new Strophe.Connection(
"http://jenan.cz:5280/http-bind/");
conn.connect(data.jid, data.password, function (status) {
if (status === Strophe.Status.CONNECTED) {
$(document).trigger('connected');
} else if (status === Strophe.Status.DISCONNECTED) {
$(document).trigger('disconnected');
} else if (status === Strophe.Status.ERROR) {
alert ('status ERROR');
} else if (status === Strophe.Status.CONNECTING) {
alert ('status CONNECTING');
} else if (status === Strophe.Status.CONNFAIL) {
alert ('status CONNFAIL');
} else if (status === Strophe.Status.AUTHENTICATING) {
alert ('status AUTHENTICATING');
} else if (status === Strophe.Status.AUTHFAIL) {
alert ('status AUTHFAIL');
} else if (status === Strophe.Status.ATTACHED);
alert ('status ATTACHED');
});
Hello.connection = conn;
});