[Xmpp4js-commit] SF.net SVN: xmpp4js: [735] trunk/src/main/javascript/transport/Script.js
Status: Beta
Brought to you by:
h-iverson
From: <h-i...@us...> - 2008-07-10 18:11:37
|
Revision: 735 http://xmpp4js.svn.sourceforge.net/xmpp4js/?rev=735&view=rev Author: h-iverson Date: 2008-07-10 11:11:45 -0700 (Thu, 10 Jul 2008) Log Message: ----------- made script transport support random wildcard hosts in order to get around browser connection limits. eg. *.bosh.soashable.com becomes 9534.bosh.soashable.com, where 9534 is some random 4 digit number. to use, include a * in the endpoint provided in config. Modified Paths: -------------- trunk/src/main/javascript/transport/Script.js Modified: trunk/src/main/javascript/transport/Script.js =================================================================== --- trunk/src/main/javascript/transport/Script.js 2008-07-07 22:02:32 UTC (rev 734) +++ trunk/src/main/javascript/transport/Script.js 2008-07-10 18:11:45 UTC (rev 735) @@ -37,6 +37,13 @@ */ Xmpp4Js.Transport.Script = function(config) { + // support wild card hosts to get around the 2 connection + // limit + if( config.endpoint.indexOf('*') > -1 ) { + var rand = parseInt(Math.random() * 10000); // 4 digits of random + config.endpoint = config.endpoint.replace('*', rand); + } + /** * @private * @type String This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |