powered by Jive Software

Are there limitations on connections

I am trying to create a chat where I first show a list of rooms on different servers.

For each server I do both a discovery for Info and Items. If a server is available the user can connect to a room.

a piece of the code for the discovery:

var babilejoj:Array = new Array("esperanto@conference.jabber.org", "esperanto@conference.jabber.ru", "esperanto@conference.jabber.cd.chalmers.se", "esperanto@conference.jabber.com", "esperanto@conference.jabber.linux.it");

var checkRooms = function (connection) {

var browser = new Browser( connection );

for ( var x = 0; x < babilejoj.length; x++)

{

var server = new Object();

server.servilo = babilejoj[x].split(’’@’’)[1];

server.titolo = ‘’’’;

server.uzantoj = ‘’?’’;

_root.myDataGrid.addItem(server);

var iqHandler = new Object();

iqHandler.number = x;

iqHandler.handleEvent = function( iq:IQ )

{

var itemExt:InfoDiscoExtension =iq.getAllExtensions()[0];

_root.myDataGrid.editField(this.number, ‘‘titolo’’, itemExt.identities[0].name)

_root.myDataGrid.editField(this.number, ‘‘jid’’, itemExt.service)

_root.myChannel.addItem(itemExt.identities[0].name, itemExt.service);

}

var iqHandler_B = new Object();

iqHandler_B.number = x;

iqHandler_B.handleEvent = function( iq:IQ )

{

var itemExts:Array = iq.getAllExtensions();

var itemExt:ItemDiscoExtension =iq.getAllExtensions()[0];

var uzantlisto:Array = new Array();

for( var i=0; i< itemExt.items.length; i++) {

uzantlisto.push(itemExt.items[ i ].name );

}

var entry:String = ‘’’’;

if ( uzantlisto.length == 0 )

{

entry = ‘‘0’’;

} else{

entry = uzantlisto.length + ‘’ - ‘’ + uzantlisto.join(’’, ‘’);

}

_root.myDataGrid.editField(this.number, ‘‘uzantoj’’, entry)

}

browser.getServiceInfo(babilejoj[x], “handleEvent”, iqHandler);

browser.getServiceItems(babilejoj[x], “handleEvent”, iqHandler_B);

}

}

The problem is that when I add only 2 entries to the Array then when it is trying to connect to a room I get a stream error (while in the trace the send seems to be correct)

Any suggestions?