Jaxl HTTP with BOSH server can't connect successfully

152 views
Skip to first unread message

Viher3

unread,
Feb 23, 2014, 10:29:47 AM2/23/14
to ja...@googlegroups.com
Hello everyone,

I am trying to make an web chat client wich connects with a game chat.

I begin working with Jaxl as a bot, and i coulded connect succcessfully and send some messages to game chat friends.

But when i have tried to do the same but with a BOSH server (because i want to make a web chat client), Jaxl can't connect with the server and shows me the following error:

This error shows me when i am executing the php file in the linux terminal. If i execute the file in the browser, the site never ends loading.

(My BOSH server is working fine, i use Prosody server).

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

jaxl:222 - 2014-02-23 15:17:04 - strict mode enabled, adding exception handlers. Set 'strict'=>TRUE inside JAXL config to disable this
jaxl:167 - 2014-02-23 15:17:04 - created pid file /var/www/lolchat/.jaxl/run/jaxl_6807.pid

jaxl:779 - 2014-02-23 15:17:04 - event 'end_cb' catched in handle_other with stanza name stream
xmpp_stream:112 - 2014-02-23 15:17:04 - got invalid return value from state handler 'wait_for_stream_features', sending end stream...
xmpp_stream:115 - 2014-02-23 15:17:04 - state handler 'logged_out' returned N;, kindly report this to developers

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I have the last Jaxl version. And here its the sorce code from my PHP file:

<?php

require_once
('jaxl.php');

$con
['jid'] = "us...@pvp.net";
$con
['pass'] = "AIR_password";
$con
['resource'] = "xiff";
$con
['host'] = "chat.eu.lol.riotgames.com";
$con
['port'] = "5223";
$con
['bosh_url'] = "http://localhost:5280/http-bind";

$client
= new JAXL($con);

$client
->add_cb('on_auth_success', function() {
   
global $client;
    _info
("got on_auth_success cb, jid ".$client->full_jid->to_string());      
        echo
"LOGIN OK";
});

$client
->add_cb('on_auth_failure', function($reason) {
   
global $client;
    _info
("got on_auth_failure cb with reason $reason");
    $client
->send_end_stream();
        echo
"LOGIN ERR";
});

//
// finally start configured xmpp stream
//
$client
->start();
echo
"<br />done\n";

?>


What i am doing wrong?

Thanks!


Reply all
Reply to author
Forward
0 new messages