mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
XHR sending is now handled exclusively by XHR.js HTMLFile inherits from XHR for POST handling Implemented heartbeats echoing Events integrated directly into socket.js New default method to add events is `on`. Added aliases for old event handling methods Simplified utilities / removed legacy code Updated build.js Actually implemented the private method _get for XHR transports (we were overriding connect() before) Updated example/API
22 lines
436 B
JavaScript
22 lines
436 B
JavaScript
/**
|
|
* Socket.IO client
|
|
*
|
|
* @author Guillermo Rauch <guillermo@learnboost.com>
|
|
* @license The MIT license.
|
|
* @copyright Copyright (c) 2010 LearnBoost <dev@learnboost.com>
|
|
*/
|
|
|
|
io.util = {
|
|
|
|
inherits: function(ctor, superCtor){
|
|
// todo
|
|
},
|
|
|
|
indexOf: function(arr, item, from){
|
|
for (var l = arr.length, i = (from < 0) ? Math.max(0, l + from) : from || 0; i < l; i++){
|
|
if (arr[i] === item) return i;
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
}; |