Skip to content

Commit b79faf8

Browse files
committed
Updated client.
1 parent ce88922 commit b79faf8

File tree

165 files changed

+9117
-2167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+9117
-2167
lines changed

support/socket.io-client/History.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
0.7.0 / 2011-??-??
3+
==================
4+
5+
* Fixed JSONP interaction with jQuery. [saschagehlich]
6+
* Fixed; different port now considered cross-domain.
7+
* Added compatibility for inclusion in non-browser environments.
8+
* Added package.json.
9+
* Added noConflict support. [kreichgauer]
10+
* Added reconnection support with exponential backoff. [3rd-Eden]
11+
12+
0.6.2 / 2011-02-05
13+
==================
14+
15+
* Fixed problem with xhr-multipart buffering
16+
* Updated Flash websocket transport
17+
* Fixed tryTransportsOnConnectTimeout option
18+
* Added 'connect_failed' event after the last available transport fails to connect
19+
within the timeout
20+
* Add 'connecting' event emit on each connection attempt.
21+

support/socket.io-client/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ The insecure version can be found [here](http://github.com/gimite/web-socket-js/
168168

169169
##### Methods:
170170

171-
- *connect*
171+
- *connect(λ)*
172172

173-
Establishes a connection.
173+
Establishes a connection. If λ is supplied as argument, it will be called once the connection is established.
174174

175175
- *send(message)*
176176

@@ -183,6 +183,10 @@ The insecure version can be found [here](http://github.com/gimite/web-socket-js/
183183
- *on(event, λ)*
184184

185185
Adds a listener for the event *event*.
186+
187+
- *once(event, λ)*
188+
189+
Adds a one time listener for the event *event*. The listener is removed after the first time the event is fired.
186190

187191
- *removeEvent(event, λ)*
188192

@@ -225,10 +229,9 @@ The insecure version can be found [here](http://github.com/gimite/web-socket-js/
225229

226230
Fired when a reconnection is attempted, passing the next delay for the next reconnection.
227231

228-
229232
- *reconnect_failed*
230233

231-
Fired when all reconnection attempts have failed and we where unsucessfull in reconnecting to the server.
234+
Fired when all reconnection attempts have failed and we where unsuccessful in reconnecting to the server.
232235

233236
### Contributors
234237

support/socket.io-client/lib/io.js

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,46 @@
11
/**
2-
* Socket.IO client
3-
*
4-
* @author Guillermo Rauch <[email protected]>
5-
* @license The MIT license.
6-
* @copyright Copyright (c) 2010 LearnBoost <[email protected]>
2+
* socket.io-node-client
3+
* Copyright(c) 2011 LearnBoost <[email protected]>
4+
* MIT Licensed
75
*/
86

7+
/**
8+
* @namespace
9+
*/
910
var io = 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 + '/';
11+
12+
/**
13+
* Library version.
14+
*/
15+
version: '0.6.2',
16+
17+
/**
18+
* Updates the location of the WebSocketMain.swf file that is required for the Flashsocket transport.
19+
* This should only be needed if you want to load in the WebSocketMainInsecure.swf or if you want to
20+
* host the .swf file on a other server.
21+
*
22+
* @static
23+
* @deprecated Set the variable `WEB_SOCKET_SWF_LOCATION` pointing to WebSocketMain.swf
24+
* @param {String} path The path of the .swf file
25+
* @api public
26+
*/
27+
setPath: function(path){
28+
if (window.console && console.error) console.error('io.setPath will be removed. Please set the variable WEB_SOCKET_SWF_LOCATION pointing to WebSocketMain.swf');
29+
this.path = /\/$/.test(path) ? path : path + '/';
1530
WEB_SOCKET_SWF_LOCATION = path + 'lib/vendor/web-socket-js/WebSocketMain.swf';
16-
}
31+
}
1732
};
1833

34+
/**
35+
* Expose Socket.IO in jQuery
36+
*/
1937
if ('jQuery' in this) jQuery.io = this.io;
2038

39+
/**
40+
* Default path to the .swf file.
41+
*/
2142
if (typeof window != 'undefined'){
2243
// WEB_SOCKET_SWF_LOCATION = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//cdn.socket.io/' + this.io.version + '/WebSocketMain.swf';
2344
if (typeof WEB_SOCKET_SWF_LOCATION === 'undefined')
2445
WEB_SOCKET_SWF_LOCATION = '/socket.io/lib/vendor/web-socket-js/WebSocketMain.swf';
25-
}
46+
}

0 commit comments

Comments
 (0)