Commit Graph

75 Commits

Author SHA1 Message Date
Guillermo Rauch
95176a08be Potential speedup? 2011-12-21 14:41:58 -08:00
Guillermo Rauch
9fceb20d8e Allow for no packet payloads and fixed packet decoding within payloads. 2011-12-21 14:13:21 -08:00
Guillermo Rauch
e6260afe2e Disallow empty payload messages. 2011-12-21 14:12:53 -08:00
Guillermo Rauch
fc6273f8a0 Allow for empty payloads. Only for consistency, we never should send empty payloads. 2011-12-21 14:12:18 -08:00
Guillermo Rauch
736d509963 Allow for empty data (different from _no_ data). 2011-12-21 14:11:54 -08:00
Guillermo Rauch
94d305954c Avoid potentially slow error lookups and make sure you can't use constructor
as a packet type.
2011-12-21 13:29:24 -08:00
Guillermo Rauch
0531a2c9fa Improved packet decoding speed and reliability. 2011-12-21 13:28:05 -08:00
Guillermo Rauch
484ec34cc1 Cast single packet type indexes to string. 2011-12-21 13:24:36 -08:00
Guillermo Rauch
5e3a2b368f Fixed; encodePacket accepts a packet object now. 2011-12-21 11:09:24 -08:00
Guillermo Rauch
25773618fa Payload parser now operates strictly on packets. 2011-12-21 11:03:52 -08:00
Guillermo Rauch
7e635ebf49 Added comment 2011-12-21 10:59:41 -08:00
Guillermo Rauch
fb73162d25 Fixed decodePayload to assume decoded packets. 2011-12-21 10:59:11 -08:00
Guillermo Rauch
32aeda0dfa Fixed doClose JSONP override. 2011-12-21 10:58:29 -08:00
Guillermo Rauch
24d69ebb00 Fixed xhr polling doClose override. 2011-12-21 10:55:06 -08:00
Guillermo Rauch
bdc44b33b9 Make Socket inherit from EventEmitter. 2011-12-21 10:54:42 -08:00
Guillermo Rauch
69f6edb67a Cleared up exports. 2011-12-21 10:54:25 -08:00
Guillermo Rauch
44b95c30f5 Added missing dependencies to Socket and cleared exports. 2011-12-21 10:53:58 -08:00
Guillermo Rauch
d1c6fbdab6 Exposed EventEmitter, Transport and transports to eio. 2011-12-21 10:53:38 -08:00
Guillermo Rauch
ee7e362d68 Required parser in Transport. 2011-12-21 10:49:28 -08:00
Guillermo Rauch
976ecd4956 Renamed Socket#write > Socket#sendPacket 2011-12-21 10:48:45 -08:00
Guillermo Rauch
cb573c51e5 Moved packets to the transport abstraction. 2011-12-21 10:44:32 -08:00
Guillermo Rauch
31d0108ced Switched probe to ping/pong. 2011-12-21 10:43:01 -08:00
Guillermo Rauch
c2eb0aa112 Initialized buffer for Transport in constructor. 2011-12-21 10:42:05 -08:00
Guillermo Rauch
3f78878d30 Initialized buffer for Socket in constructor.
Initialized buffer for Socket in constructor.
2011-12-21 10:41:01 -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
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
7c28a36ef4 Fixed undefined util. 2011-12-15 10:11:23 -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
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