Files
socket.io/lib/io.js
Guillermo Rauch 660f9adb2c Now altering WEB_SOCKET_SWF_LOCATION (this way we don't need the web-socket-js WebSocket object to be there)
Flashsocket .connect() and .send() call addTask.
Removed _loaded, since addTask does load checking internally
Build
2010-09-09 17:19:55 -07:00

23 lines
649 B
JavaScript

/**
* Socket.IO client
*
* @author Guillermo Rauch <guillermo@learnboost.com>
* @license The MIT license.
* @copyright Copyright (c) 2010 LearnBoost <dev@learnboost.com>
*/
this.io = {
version: '0.6',
setPath: function(path){
this.path = /\/$/.test(path) ? path : path + '/';
// this is temporary until we get a fix for injecting Flash WebSocket javascript files dynamically,
// as io.js shouldn't be aware of specific transports.
WEB_SOCKET_SWF_LOCATION = path + 'lib/vendor/web-socket-js/WebSocketMain.swf';
}
};
if ('jQuery' in this) jQuery.io = this.io;
if (typeof window != 'undefined') this.io.setPath('/socket.io/');