I am building a client side application that uses XMPP for that I am connection through Strophe.js but unable to do so.
Please note that I am new to XMPP.
Code that I am using
(function($){
// create connection
var conn = new Strophe.Connection('https://xm3.mysite.net:5280/http-bind');
conn.connect('myname@mysite.net', '123456', function (status) {
if (status === Strophe.Status.CONNECTED) {
console.log('Connection created!');
}else if (status == Strophe.Status.CONNFAIL) {
console.log('Connection Failed!');
}else if (status === Strophe.Status.DISCONNECTED) {
console.log('Connection terminated!');
}else {
console.log('Connection was not able to go-through!!');
console.log(status);
}
});
})(jQuery);
I have also tried adding SSL as protocol to the connection object
var conn = new Strophe.Connection('https://xm3.mysite.net:5280/http-bind', {protocol: "ssl"});
In return I am getting the error of "Connection was not able to go-through!"
Return status is 1, which I also want to know what this means or if there is specific link which layouts the meaning of error codes returned.
Important point to note here is CONNFAIL is actually not being called which is strange, have also tried CONNECTING status which is being fired if used.
in browser, and check its working or not.
– Butani Vijay Sep 19 '16 at 10:49