Commit Graph

7693 Commits

Author SHA1 Message Date
Guillermo Rauch
2bf65750f3 Added; test/common exports HTTPClient for transport inheritance.
Added the possibility of HTTPClient not buffering responses.
2011-05-17 11:22:03 -07:00
Guillermo Rauch
e6ad372ef3 Changed; finished refactoring tests. All passing. 2011-05-17 10:52:45 -07:00
Guillermo Rauch
e9ab235174 Tests refactored. 2011-05-16 20:07:56 -07:00
Guillermo Rauch
8f0f71ac92 Changed; cleaned up test utilities:
- Moved all the logic into a reusable class.
 - Minimize globals by only exposing `client` and `create`
 - Separate `http.Agent` per clients so that we can terminate all sockets at once.
 - Implemented `create` to easily spawn a socket.io server for a given client.
2011-05-16 19:45:03 -07:00
Guillermo Rauch
60ad6e3ceb Fixed; HTMLFile#doWrite never gets called since it's an HTTP non-polling transport. 2011-05-16 19:44:37 -07:00
Guillermo Rauch
4724724e20 Changed; only do forced disconnection handling for writable sockets. This prevents
Transport objects created with POST requests from triggering disconnect events too.
Changed; moved forced disconnect logic into Transport#onForcedDisconnect.
2011-05-16 19:43:30 -07:00
Guillermo Rauch
5e61a3bd5a Changed; publish the disconnect event after the disconnect-force internal event. 2011-05-16 19:43:08 -07:00
Guillermo Rauch
0bebd38042 Changed; renamed SocketNamespace#nsp to SocketNamespace#name.
Changed; make sure to only emit the connection event when a client is registered for
the default namespace.
Added `connect` packet handler.
2011-05-16 19:41:52 -07:00
Guillermo Rauch
ad1946e79d Fix; make sure to reset length when parsing a payload. 2011-05-15 19:20:14 -07:00
Guillermo Rauch
f63f72cdac Added additional packet to payload decoding test. 2011-05-15 19:20:03 -07:00
Guillermo Rauch
968afd89a5 Fixed handling of incoming POST requests to a XHR transport.
Fixed payloading encoding.
2011-05-15 19:07:04 -07:00
Guillermo Rauch
30ceabf10f Removed __io counter in incoming sockets. 2011-05-15 19:06:21 -07:00
Guillermo Rauch
b7c877b497 Added additional parser tests. 2011-05-15 19:06:01 -07:00
Guillermo Rauch
db87502b9b Fixed parser#encodePayload 2011-05-15 19:05:46 -07:00
Guillermo Rauch
9820716ff0 Fixed client packet disconnect test. 2011-05-15 13:37:01 -07:00
Guillermo Rauch
5f028c5ca9 Fixed; moved data decoding logic into base HTTP transport interface. 2011-05-15 13:36:21 -07:00
Guillermo Rauch
f2060d1283 Added remaining tests. 2011-05-14 22:04:01 -07:00
Guillermo Rauch
5a164ed053 Fixed tests helpers. 2011-05-14 20:25:46 -07:00
Guillermo Rauch
3dda158065 Changed; make sure to Transport#resume only if the client is connected.
Fixed; send disconnection packet when forced disconnecting.
2011-05-14 19:22:32 -07:00
Guillermo Rauch
4f23e97310 Changed; make sure to clean up client prior to emission of disconnection events. 2011-05-14 19:22:06 -07:00
Guillermo Rauch
af57fd9801 Changed; add disconnect check to Socket#disconnect. 2011-05-14 19:21:42 -07:00
Guillermo Rauch
f1f3918739 Changed instrumentation for disconnection URI from error to debug. 2011-05-14 19:21:19 -07:00
Guillermo Rauch
c6f4a5701f Merge branch 'master' of github.com:LearnBoost/Socket.IO-node 2011-05-14 00:55:13 -07:00
Arnout Kazemier
b1cde55d97 Fixes #133 2011-05-13 22:02:47 +02:00
Arnout Kazemier
d77379ced0 Fixing #208 again, now with proper update 2011-05-13 21:56:43 +02:00
Guillermo Rauch
c6f8009e69 Ignore files 2011-05-10 14:49:46 -07:00
Guillermo Rauch
6ed7964f8f Fixed requests that just target the resource. 2011-05-10 14:49:13 -07:00
Guillermo Rauch
4f6734b006 Merge pull request #202 from 3rd-Eden/master
Misc
2011-05-09 15:19:46 -07:00
Guillermo Rauch
5ddc23f82e Fixed style [OCD-related work]. 2011-05-08 22:42:57 -07:00
Guillermo Rauch
910995a8f2 Fixed emission of non-socket.io events in SocketNamespace. 2011-05-08 22:42:31 -07:00
Guillermo Rauch
5f8192799b Fixed iteration of namespaces in Manager 2011-05-08 22:42:16 -07:00
Guillermo Rauch
790e916cd4 OCD-related work. 2011-05-08 20:46:29 -07:00
Guillermo Rauch
7f3c5f6a73 Fixed typo 2011-05-08 20:44:54 -07:00
Guillermo Rauch
4889057f9a Changed/Added some tests 2011-05-08 20:40:18 -07:00
Guillermo Rauch
a27a6ad2b6 Changed; only output CORS headers for cross-domain requests to minimize framing.
Changed debug instrumentation.
2011-05-08 20:38:53 -07:00
Guillermo Rauch
0a69b580c4 Added WebSocket#writeVolatile (and WebSocket#drained state)
Added WebSocket#doClose
2011-05-08 20:38:10 -07:00
Guillermo Rauch
6665e08cb7 Added HTTPTransport#doClose. 2011-05-08 20:37:49 -07:00
Guillermo Rauch
600c05bbbe Changed; leveraged Transport#close instead of Transport#write with empty string.
Added more debug instrumentation.
2011-05-08 20:37:08 -07:00
Guillermo Rauch
d5e922ba12 Changed debug statement. 2011-05-08 20:36:49 -07:00
Guillermo Rauch
c39191b3fd Added the notion of forced disconnects.
Added Transport#onSocketConnect interface.
Added Transport#clearTimeouts
Added heartbeat response handling.
Added Transport#close, Transport#onClose, chanaged Transport#end.
2011-05-08 20:35:38 -07:00
Guillermo Rauch
eb77c5e01a Added disconnction handler in Memory store. 2011-05-08 20:35:22 -07:00
Guillermo Rauch
d739f560b8 Added SocketNamespace#log getter.
Added SocketNamespace#socket to retrieve/create Sockets.
Added packet handling.
2011-05-08 20:34:28 -07:00
Guillermo Rauch
c32708c383 Changed; make sure to ignore newListener event when Socket#emit is overridden.
Changed; keep track of disconnected state and ACK callbacks.
Added; make sure to emit the `disconnect` event.
Removed readyState handling, shouldn't be part of the public API.
2011-05-08 20:31:21 -07:00
Guillermo Rauch
34a701fb7f Changed; initialize default namespace with Manager#for instead of manually.
Changed; perform error handling for Store#isHandshaken.
Added; handle manual disconnect urls.
Changed; make sure to initialize a socket for all namespaces when a client connects.
Changed; delegate packet handling to the appropriate SocketNamespace.
Changed; cache regular expression for checkRequest method.
2011-05-08 20:28:16 -07:00
Guillermo Rauch
b7488e7a13 Added failing disconnection event test 2011-05-07 18:33:43 -07:00
Guillermo Rauch
ed12f347eb Changed; make sure to clear polling timeout if the connection closes.
Added "clearPollTimeout" method
2011-05-07 18:33:17 -07:00
Guillermo Rauch
5d7c5f7471 Changed; make sure to compare the decoded packet representation with an empty
endpoint and advice.
2011-05-07 18:25:40 -07:00
Guillermo Rauch
416cd66591 Fix for detecting HTTP-based transports for get() test shortcut. 2011-05-07 18:25:14 -07:00
Guillermo Rauch
c3171be7a8 Added; implemented message handling at transport level for heartbeat clearing and
disconnection handling.
2011-05-07 18:24:45 -07:00
Guillermo Rauch
8cd476295a Added Store disconnect method 2011-05-07 18:24:29 -07:00