Inital Commit
[oweals/finalsclub.git] / bruml / lib / socket.io / support / socket.io-client / lib / io.js
1 /**
2  * Socket.IO client
3  * 
4  * @author Guillermo Rauch <guillermo@learnboost.com>
5  * @license The MIT license.
6  * @copyright Copyright (c) 2010 LearnBoost <dev@learnboost.com>
7  */
8
9 this.io = {
10         version: '0.6.2',
11         
12         setPath: function(path){
13                 if (window.console && console.error) console.error('io.setPath will be removed. Please set the variable WEB_SOCKET_SWF_LOCATION pointing to WebSocketMain.swf');
14                 this.path = /\/$/.test(path) ? path : path + '/';
15     WEB_SOCKET_SWF_LOCATION = path + 'lib/vendor/web-socket-js/WebSocketMain.swf';
16         }
17 };
18
19 if ('jQuery' in this) jQuery.io = this.io;
20
21 if (typeof window != 'undefined'){
22   // WEB_SOCKET_SWF_LOCATION = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//cdn.socket.io/' + this.io.version + '/WebSocketMain.swf';
23   if (typeof WEB_SOCKET_SWF_LOCATION === 'undefined')
24     WEB_SOCKET_SWF_LOCATION = '/socket.io/lib/vendor/web-socket-js/WebSocketMain.swf';
25 }