var Iniciar = {
user: '[email protected]',
pass: 'user1',
conexion: null,...
}
$(document).ready(function () {
Iniciar.log('Iniciando conexion');
$(document).trigger('conectar');
});
$(document).bind('conectar', function () {
//conexion
var conn = new Strophe.Connection('http://192.168.0.1:5280/bosh');
Iniciar.conexion = conn;
Iniciar.conexion.rawInput = Iniciar.raw_entrada;
Iniciar.conexion.rawOutput = Iniciar.raw_salida;
Iniciar.conexion.addHandler(Iniciar.on_presence, null, "presence");
Iniciar.conexion.connect(
Iniciar.user,
Iniciar.pass,
function(status){
if(status == Strophe.Status.CONNECTING){ ...else if(status == Strophe.Status.CONNECTED){
$('#cuadro').append(' 2 de 3 conectado ');
$(document).trigger('conectando');
}else{
//
}
}
);
The previous code allows me to enter only once, then I close section. To later enter again but do not enter and the log unfolds me the message. and so on I have to restart the server to enter once ... I am using Ejabberd 18.06 on windows server2008 I have congured in IIS and the server is installed on a local network.
Resp.C http://jabber.org/protocol/httpbind 'to =' im.server.com ' xml: lang = 'en' wait = '60 'hold =' 1 'content =' text / xml; charset = utf-8 ' see = '1.6' xmpp: version = '1.0' xmlns: xmpp = 'urn: xmpp: xbosh' / > Ans.S http://jabber.org/protocol/httpbind 'xmlns: xmpp =' urn: xmpp: xbosh ' xmlns: stream = ' link ' xmpp: version = '1.0' authid = '5304187563466404975' sid = '3c410c892727785a65ed19e27de577ea04c5c5d1' wait = '60 'ver =' 1.11 ' polling = '2' inactivity = '30 'hold =' 1 'xmpp: restartlogic =' true ' requests = '2' secure = 'true' maxpause = '120' from = 'im.server.com' / >
Conexion Fallida!