Commit Graph

62 Commits

Author SHA1 Message Date
Guillermo Rauch
1caabfcd9e Fixed util tests. 2011-12-20 22:24:15 -08:00
Guillermo Rauch
b7c703998e Some more tests 2011-12-20 22:24:05 -08:00
Guillermo Rauch
b18d686c0c Added expect.js/mocha to devDependencies. 2011-12-20 22:23:45 -08:00
Guillermo Rauch
0c894cf0d2 Removed old should - using expect.js 2011-12-20 22:23:29 -08:00
Guillermo Rauch
60983c31d0 Finished decodePayload. 2011-12-20 22:23:06 -08:00
Guillermo Rauch
0a68dd160d Drastically simplified payload encoding. 2011-12-20 21:42:11 -08:00
Guillermo Rauch
917aae23c8 Added documentation for payload encode SPEC. 2011-12-20 21:35:51 -08:00
Guillermo Rauch
064d1872a5 Added error handling to packet decoding. 2011-12-20 21:35:34 -08:00
Guillermo Rauch
cefb25f3a9 Improved packet decoding. 2011-12-20 21:26:19 -08:00
Guillermo Rauch
ab949be7ad Added support for stringification of data objects. 2011-12-20 21:24:33 -08:00
Guillermo Rauch
89ea5370eb Added description of packet encoding for SPEC 2011-12-20 21:24:16 -08:00
Guillermo Rauch
2f12810778 Added pre-fabricated packet for parser errors. 2011-12-20 21:21:44 -08:00
Guillermo Rauch
ffc530613b Clean up packet types. 2011-12-20 21:21:12 -08:00
Guillermo Rauch
8adea259c3 Added test Makefile tasks. 2011-12-20 09:20:18 -08:00
Guillermo Rauch
d86ab65a88 REnamed engine-client > engine.io-client. 2011-12-20 09:15:16 -08:00
Guillermo Rauch
b033cf26b8 Exposed util and parser. 2011-12-20 09:14:46 -08:00
Guillermo Rauch
499e288ed6 Fixed WS writeMany method. 2011-12-15 10:19:36 -08:00
Guillermo Rauch
c1a7f91dc4 Fixed JSON transport require. 2011-12-15 10:19:17 -08:00
Guillermo Rauch
c149684f7f Fixed XHR references 2011-12-15 10:16:59 -08:00
Guillermo Rauch
1ed582b3e0 Fixed try/catch block 2011-12-15 10:14:39 -08:00
Guillermo Rauch
3705e60537 Fixed typo 2011-12-15 10:14:16 -08:00
Guillermo Rauch
56b6597e49 Adapted README to new global. 2011-12-15 10:11:44 -08:00
Guillermo Rauch
7c28a36ef4 Fixed undefined util. 2011-12-15 10:11:23 -08:00
Guillermo Rauch
4d45b70e37 Fixed package.json name 2011-12-04 19:23:56 -08:00
Guillermo Rauch
246ddbb0b0 Added build make task. 2011-12-03 18:11:24 -08:00
Guillermo Rauch
74ba86a686 Added browserbuild devDependency. 2011-12-03 18:11:11 -08:00
Guillermo Rauch
6c6630e3d3 Fixed README. 2011-12-03 14:08:07 -08:00
Guillermo Rauch
0ac8ac72ac Fixed jsdoc block. 2011-12-03 14:06:53 -08:00
Guillermo Rauch
1fc5d132b6 Change constructor name from Engine to Socket. 2011-12-03 14:03:00 -08:00
Guillermo Rauch
26d80e2fe8 Renamed global from io to eio to avoid confusion.
Start renaming constructor `Engine` to `Socket`
2011-12-03 14:02:05 -08:00
Guillermo Rauch
c7ecd93295 Added util tests. 2011-11-27 11:31:00 -08:00
Guillermo Rauch
7489fa4378 Added parseUri to util, cleaned up. 2011-11-27 11:30:28 -08:00
Guillermo Rauch
edc76f322a Added transport name to websocket 2011-11-27 11:30:12 -08:00
Guillermo Rauch
4c0e69e458 To close polling transports, we must write a message. 2011-11-27 11:29:43 -08:00
Guillermo Rauch
8dd5a6dbab Also make sure close is triggered. 2011-11-27 11:29:16 -08:00
Guillermo Rauch
2bb5d0b00d Do peaking of messages in polling transport:
- if the transport readyState is `opening`, expect a PONG packet
- if we get close, abort ongoing requests
2011-11-27 11:28:03 -08:00
Guillermo Rauch
bff32b2463 Write a ping packet after opening polling. 2011-11-27 11:27:51 -08:00
Guillermo Rauch
889797db90 Style cleanup 2011-11-27 11:27:41 -08:00
Guillermo Rauch
60e8782dac Added name to polling XHR, cleaned up. 2011-11-27 11:27:20 -08:00
Guillermo Rauch
d1d691fdff Added jsonp transport name 2011-11-27 11:27:07 -08:00
Guillermo Rauch
9ad1f7f158 Simplified script loader. 2011-11-27 11:26:52 -08:00
Guillermo Rauch
1286e41301 Fixed last commit 2011-11-27 11:26:27 -08:00
Guillermo Rauch
6360ebd3cc Proxy web-socket-js debugging to our own 2011-11-27 11:25:33 -08:00
Guillermo Rauch
73263b98bc Added transport name to proto. 2011-11-27 11:25:22 -08:00
Guillermo Rauch
5a2580ec7f Added reusable noop 2011-11-27 11:25:15 -08:00
Guillermo Rauch
6c0a714641 Removed data event and do parsing in transport.
Unfortunately, it makes our API less clean to depend on specific
parsing done by the Transport when clearly it doesnt belong there.

The problem is that XHR polling *needs* specific messages to compensate
for lack of features such as the ability to signal a connection close.

Since we're already doing peaking of message types in the polling transport,
we want to avoid the performance penalty of double parsing at the polling
level and later at the Engine level, and we sacrifice a little bit of
API purity.
2011-11-27 11:23:47 -08:00
Guillermo Rauch
64f371477b Improved error message 2011-11-27 10:38:17 -08:00
Guillermo Rauch
5435b043ff Make sure Transport#error emits a transport error 2011-11-27 10:37:54 -08:00
Guillermo Rauch
f77420c317 Gave up, we need an Engine reference from transport. 2011-11-27 10:34:16 -08:00
Guillermo Rauch
bd0601a66e Improved message types
- heartbeat is now a ping/pong
- probing is now a ping/pong
2011-11-27 10:29:46 -08:00