487 Commits

Author SHA1 Message Date
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
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
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
1726da4ca3 Added support for json-p handshake. 2011-05-24 22:53:42 -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
Guillermo Rauch
5a93d72e9c Make sure automatic endpoints preserve endpoint. 2011-05-24 22:09:03 -07:00
Guillermo Rauch
bfabd6eadf Renamed Socket#packets ACK packets count to ackPackets for clarity. 2011-05-24 21:16:45 -07:00
Guillermo Rauch
a647fae3c4 Remvoed volatile messages unsubscription. 2011-05-24 21:03:21 -07:00
Guillermo Rauch
245c57c527 Fix style. 2011-05-24 21:02:26 -07:00
Guillermo Rauch
b663f5dd24 Make sure the Transport assumes delivered messages are pre-encoded. 2011-05-24 21:01:27 -07:00
Guillermo Rauch
79f6e5c538 Make sure that Socket#packet encodes the message prior to publication. 2011-05-24 21:01:05 -07:00
Guillermo Rauch
61eb0a2fd4 Added manual ack data callback handling. 2011-05-24 21:00:48 -07:00
Guillermo Rauch
adf9f1150a Added automatic ACK handling to Transport. 2011-05-24 20:23:45 -07:00
Guillermo Rauch
aa3b99a630 Added Socket#$emit as the original EventEmitter emit 2011-05-24 18:51:40 -07:00
Guillermo Rauch
7b486e2b37 Make sure to set drain to false upon htmlfile transport write. 2011-05-22 20:18:03 -07:00
Guillermo Rauch
a2c30a1416 Fixed event emission from Socket (the name key was missing) 2011-05-22 20:17:20 -07:00
Guillermo Rauch
f020d012f2 Make sure the socket is considered drained when re-set, specially if a socket is
closed before its drain event fires.
2011-05-22 14:28:41 -07:00
Guillermo Rauch
b76901eb56 Removed writeVolatile special handling for polling transports, since it's now handled
elegantly across all transports, and polling drained-ness doesn't concern us.
2011-05-22 14:22:41 -07:00
Guillermo Rauch
777746d42d Changed; moved volatile message subscription to request initialization.
Fixed; socket errors now close the transport instead of resulting in a disconnection.
Transport#writeVolatile now considers transport open state.
2011-05-22 14:20:18 -07:00
Guillermo Rauch
e436f90ac9 Removed Transport#drained initialization from WebSocket transport constructor. 2011-05-22 13:25:13 -07:00
Guillermo Rauch
c0e1944462 Added WebSocket#drained initialization to constructor. 2011-05-22 13:24:51 -07:00
Guillermo Rauch
f5edca935d Added Transport#writeVolatile for every transport.
Removed WebSocket#writeVolatile, inherit from Transport instead.
Removed `drain` listener from WebSocket onSocketConnect method.
2011-05-22 13:18:51 -07:00
Guillermo Rauch
9cfffa48e8 Added Transport#drained and Transport#onSocketDrain for every transport. 2011-05-22 13:17:00 -07:00
Guillermo Rauch
07f5d1ff64 Added MemoryStore#clients.
Added MemoryStore#join.
Added MemoryStore#leave.
2011-05-21 20:57:41 -07:00
Guillermo Rauch
8416e76114 Added SocketNamespace#store shortcut.
Added SocketNamespace#in
Added SocketNamespace#for
Implemented SocketNamespace#packet
Fixed SocketNamespace#emit
Fixed SocketNamespace#send
2011-05-21 20:56:31 -07:00
Guillermo Rauch
88d5daa3b5 Finished jsonp-polling transport. 2011-05-19 15:35:18 -07:00
Guillermo Rauch
4f4d25e954 Fixed parameter names for htmlfile 2011-05-19 14:53:56 -07:00
Guillermo Rauch
f47a9dc110 Fixed parameter names for xhr-polling 2011-05-19 14:51:55 -07:00
Guillermo Rauch
882fb96567 Fixed; constructor parameter names for websocket. 2011-05-19 14:51:08 -07:00
Guillermo Rauch
287dd40dd2 Fixed jsonp-polling and xhr-polling doWrite with no data. 2011-05-19 13:25:35 -07:00
Guillermo Rauch
ccac8fe8a4 Fixed; disable the Nagle algorithm for websocket. 2011-05-19 13:17:42 -07:00
Guillermo Rauch
43f6071f4f Fixed jsonp-polling writes. 2011-05-19 13:17:25 -07:00
Guillermo Rauch
b4b7c0b428 Fixed; override clearTimeouts for clearing polling timeout for polling transports. 2011-05-19 13:16:59 -07:00
Guillermo Rauch
750e8a9272 Fixed; removed noDelay for all sockets. 2011-05-19 13:16:43 -07:00
Guillermo Rauch
4f293ae44e Completed WebSocket transport.
Added (naive) support for closing frames.
2011-05-18 20:39:24 -07:00
Guillermo Rauch
080abccf10 Fixed distributed connections detection.
Fixed; make sure all heartbeats are captured.
Changed; make sure to close on our end when the socket 'end'/'close' event fires.
2011-05-18 20:37:51 -07:00
Guillermo Rauch
7f788e1404 Fixed; added callback support to MemoryStore#publish. 2011-05-18 20:37:24 -07:00
Guillermo Rauch
a9ed766b85 Fixed; this.connection is undefined. 2011-05-17 18:51:44 -07:00
Guillermo Rauch
6a513d163b Fixed; unknown transports just end the connection.
Fixed; origin verification happens at handshake time.
2011-05-17 18:51:11 -07:00
Guillermo Rauch
c0481f615e Fixed json-p debug instrumentation. 2011-05-17 16:11:51 -07:00
Guillermo Rauch
dfae47d42a Make sure to disable heartbeat intervals in polling transports. 2011-05-17 16:10:47 -07:00
Guillermo Rauch
f5133b6a6f Fixed style. 2011-05-17 16:10:33 -07:00
Guillermo Rauch
da95a4e31f Added cross-connection heartbeat clearing. In a XHR transport, if the POST request
goes through a different connection, we want to clear the heartbeat timeout set in
the connection associated with the GET request.
Added disconnect reasons.
2011-05-17 16:09:01 -07:00
Guillermo Rauch
f65d381961 Changed; hide away message publishing behind message, hearbeat methods added to
the Store.
Added support for reason passing in the store callbacks.
2011-05-17 16:08:13 -07:00
Guillermo Rauch
d35998a633 Added reason support to disconnect callbacks. 2011-05-17 16:07:54 -07:00