Commit Graph

7693 Commits

Author SHA1 Message Date
Guillermo Rauch
6ab0a4cea5 Updated tests for jsonp callback format. 2011-05-30 11:38:36 -03:00
Guillermo Rauch
abde1ca389 Updated jsonp callback format. 2011-05-30 11:38:19 -03:00
Guillermo Rauch
76bec7bc7e Faster websocket parsing (thanks mraleph) 2011-05-30 11:37:59 -03:00
Guillermo Rauch
7970815a54 Updated default timeouts.
Added error handling for JSONP handshake.
2011-05-30 11:37:20 -03:00
Guillermo Rauch
1c9db6c902 Updated builder 2011-05-30 11:31:51 -03:00
Guillermo Rauch
49816ac6c1 Added new io namespace. 2011-05-30 11:31:37 -03:00
Guillermo Rauch
6267a02056 Refactored Socket 2011-05-30 11:31:24 -03:00
Guillermo Rauch
e809856d84 Refactored Transport 2011-05-30 11:31:12 -03:00
Guillermo Rauch
3524463831 Refactored HTMLFile 2011-05-30 11:31:01 -03:00
Guillermo Rauch
d1a119d9c3 New EventEmitter 2011-05-30 11:30:51 -03:00
Guillermo Rauch
e6c49ea102 Now bundling (non-global non-obstrusive) JSON. 2011-05-30 11:30:31 -03:00
Guillermo Rauch
5650e91ecb Added new parser. 2011-05-30 11:30:25 -03:00
Guillermo Rauch
f78a874a3a Refactored JSONP polling transport. 2011-05-30 11:30:12 -03:00
Guillermo Rauch
c0c7b92387 Refactored websocket transport. 2011-05-30 11:30:01 -03:00
Guillermo Rauch
f2724ede6c Removed non-standard transports. 2011-05-30 11:29:50 -03:00
Guillermo Rauch
74fd94f2c5 Refactored XHR-polling transport. 2011-05-30 11:29:25 -03:00
Guillermo Rauch
7879f35f1e Refactored XHR transport. 2011-05-30 11:29:12 -03:00
Guillermo Rauch
4ee1d5d94b Added new utilities, refactored others. 2011-05-30 11:28:51 -03:00
Guillermo Rauch
39c6307850 Added SocketNamespace interface. 2011-05-30 11:28:36 -03:00
Guillermo Rauch
81e1c44be1 Updated client API. 2011-05-30 07:42:21 -03:00
Guillermo Rauch
9cf4008c99 Fixes for README
- Added broadcast example
- Restored code snippets since the autodetection was working but vim didn't color it
  nicely.
2011-05-29 18:36:28 -03:00
Guillermo Rauch
14c96c143c Removed console.log statements 2011-05-25 01:29:15 -07:00
Guillermo Rauch
bd1970606c Adjusted timeouts in websocket tests to avoid race conditions. 2011-05-25 01:27:01 -07:00
Guillermo Rauch
e472483bb1 Make sure to retain packet.endpoint for socket messsages. 2011-05-25 01:26:46 -07:00
Guillermo Rauch
faa00b8b2d Added test for broadcasting events in rooms. 2011-05-25 00:57:37 -07:00
Guillermo Rauch
62d3e6341e Added test for broadcasting json to a room. 2011-05-25 00:54:57 -07:00
Guillermo Rauch
7678acc8e6 Added broadcast with to test. 2011-05-25 00:51:10 -07:00
Guillermo Rauch
5f1d5e30dc Reverted back to the room flag for Socket. This way we can call SocketNamespace#in
when we relay a packet to the namespace, instead of overriding the endpoint acting
directly on SocketNamespace#flag. In addition, the room is only useful for broadcasting,
and it has no effect on the client, so `endpoint` should remain untouched.
2011-05-25 00:49:43 -07:00
Guillermo Rauch
d2d481ca8b Added test for broadcasting an event. 2011-05-25 00:33:01 -07:00
Guillermo Rauch
9f4f52beb4 Added test for broadcasting json.
Removed unnecessary connections counter in broadcast tests.
2011-05-25 00:28:54 -07:00
Guillermo Rauch
3ba715eb49 Added support for the Socket#broadcast getter in Socket#packet
Added Socket#setFlags for consistency with SocketNamespace.
2011-05-25 00:22:41 -07:00
Guillermo Rauch
4427b3e64b Added SocketNamespace#except flag setter.
Added; keep track of exceptions (list of session ids) as part of flags, that then
get reset.
Fixed JSON double encoding.
2011-05-25 00:21:51 -07:00
Guillermo Rauch
41ab26b202 Added broadcast test. 2011-05-25 00:21:42 -07:00
Guillermo Rauch
be21ca2f19 Added test for sending json to all clients in a namespace. 2011-05-24 23:55:15 -07:00
Guillermo Rauch
60dec3dd83 Add test for sending json to a room. 2011-05-24 23:52:54 -07:00
Guillermo Rauch
0f0abab380 Added test for emitting an event to a room. 2011-05-24 23:50:18 -07:00
Guillermo Rauch
c3936cb5f9 Add test for sending to all clients in a given room. 2011-05-24 23:47:41 -07:00
Guillermo Rauch
aac298d212 Fixed Socket#to and Socket#join. Make sure that the name of the room preserves the
namespace as prefix, unless the namespace is ''. This prevents collisions between
rooms of the '' endpoint with other arbitrary endpoints.
2011-05-24 23:46:59 -07:00
Guillermo Rauch
3f030bd3fb Fixed SocketNamespace#in, editing the endpoint flag directly instead of creating
`room`.
2011-05-24 23:46:31 -07:00
Guillermo Rauch
5dc8ddcda8 Added missing socket id to Store#join call. 2011-05-24 23:34:28 -07:00
Guillermo Rauch
aa4ffff9f9 Fixed broken reference to SocketNamespace object in Socket#join. 2011-05-24 23:33:24 -07:00
Guillermo Rauch
4e2941fc05 Added test for SocketNamespace#emit. 2011-05-24 23:30:09 -07:00
Guillermo Rauch
d29c0bce7b Added test for SocketNamespace#send. 2011-05-24 23:27:13 -07:00
Guillermo Rauch
be8e6ab05e Make sure to auto-join client to '' when handshaking.
Renamed internal clients dictionary to clientsMap to avoid collisions with
Store#clients.
2011-05-24 23:26:32 -07:00
Guillermo Rauch
7c6da424c0 Added new broadcast flag to Socket.
Added `Socket#to` for targeting rooms when broadcasting.
2011-05-24 23:25:48 -07:00
Guillermo Rauch
6e76229eb9 Make sure to encode packets in SocketNamespace#packet. 2011-05-24 23:25:30 -07:00
Guillermo Rauch
d1dfcf4172 Fixed test jsonp handshake parser. 2011-05-24 22:53:53 -07:00
Guillermo Rauch
1726da4ca3 Added support for json-p handshake. 2011-05-24 22:53:42 -07:00
Guillermo Rauch
71ed07d458 Added missing tests for Socket#emit ACK callbacks with endpoint ''. 2011-05-24 22:45:40 -07:00
Guillermo Rauch
a08b791cb8 Fixed Socket#emit with function as last argument (event packet with ACK) 2011-05-24 22:31:29 -07:00