Commit Graph

572 Commits

Author SHA1 Message Date
Kevin Roark
d2c8362fc6 Updated manager to reflect new class-based protocol
Main difference is the handling of parser.Decoder's 'decoded' event
and removing most of the logic that interprets the packet data from
manager, since parser handles it now.
2014-02-27 18:02:24 -05:00
Kevin Roark
67f15b16d2 Updated protocol-facing code to reflect new binary protocol
This is a squash of 6 small commits. Below is a summary of each. The gist
is that manager.js encoding and decoding portions were changed to work
with the new socket.io-protocol; this includes handling of encoding
a list of packets, and handling sequences of binary packets.

Commit 1 was the initial rewrite.

Commit 2 got all the tests passing via bug fixes.

Commit 3 updated the has-binary-data dependency and the build.

Commit 4 added nice comments.

Commits 5 and 6 updated build and engine.io dependencies respectively.
2014-02-26 13:41:51 -05:00
Kevin Roark
d5c35bb1f2 Added binary support to socket.io-client
Added changes to reflect socket.io-parser's async encoding, and use
of has-binarydata to check the event type of an event.

Next added browser tests for sending and receiving of binary data via
arraybuffers.

Then added blob tests and blob recognition.

To make blobs fully work (and Files as well), had to add packet buffering
to client so that slow-encoding blobs are still sent before other events.

I fixed a stupid bug I had added where I used the indexof module (for old
browsers) on a string somewhere instead of an array). This was causing
old IE to receive all events twice.

Old iphone tests were still failing so I updated tests to reflect that
some browsers can receive a blob but not construct them.

Finally, reduced build size by adding the "browser" field to package.json
and making browserify less confused.
2014-02-19 14:07:32 -05:00
Kevin Roark
13d34ff0b6 Should check packet.id for non-null, not 0
Like the server does!!!
2014-02-07 15:10:32 -08:00
Guillermo Rauch
c5051b67e8 fix connection test 2013-12-26 23:35:50 -03:00
Guillermo Rauch
39d5e20944 switch to browserify 2013-12-25 16:00:27 -03:00
Guillermo Rauch
c3a04f704b manager: fix reconnect attempts start 2012-12-24 20:39:28 -03:00
Guillermo Rauch
558f8b2626 socket: improve keeping track of connected state 2012-12-24 19:51:17 -03:00
Guillermo Rauch
a2f172995c manager: keep count of connected clients to close underlying transport 2012-12-24 19:51:01 -03:00
Guillermo Rauch
7ff88f80a3 socket: fix Socket#ack 2012-12-18 17:22:50 -03:00
Guillermo Rauch
1b98649bc4 socket: style 2012-12-18 17:22:14 -03:00
Guillermo Rauch
8138a4d070 socket: fix event packet encoding 2012-12-18 15:13:04 -03:00
Guillermo Rauch
bea30df54a socket: fix send message unshifting 2012-12-18 15:11:53 -03:00
Guillermo Rauch
8eb209e0cc socket: send connect packet upon open 2012-12-17 14:27:34 -03:00
Guillermo Rauch
bccc6d1ddd socket: fix packet method 2012-12-17 14:27:19 -03:00
Guillermo Rauch
df3b994242 manager: added packet method to write to engine socket 2012-12-17 14:27:07 -03:00
Guillermo Rauch
3335e3fe94 manager: let a connect timeout fire error event logic 2012-12-17 09:06:28 -03:00
Guillermo Rauch
6db3fdcf52 index: fixed multiplexing id lookup 2012-12-17 08:38:04 -03:00
Guillermo Rauch
881f284ff5 socket: remove reconnecting event 2012-12-17 08:37:10 -03:00
Guillermo Rauch
f5d6ff56d7 url: moar simplifications 2012-12-16 21:14:44 -03:00
Guillermo Rauch
0c6b0b4111 url: simplify by no longer accepting object 2012-12-16 21:13:29 -03:00
Guillermo Rauch
446680e3f9 index: simplify by only accepting strings 2012-12-16 21:12:36 -03:00
Guillermo Rauch
1a95f15695 url: remove nsp 2012-12-16 21:12:22 -03:00
Guillermo Rauch
dba6f18bdd manager: only accept a string as first parameter 2012-12-16 21:07:43 -03:00
Guillermo Rauch
efd26bf991 index: pass string uri 2012-12-16 21:07:27 -03:00
Guillermo Rauch
4e82aaff87 url: allow port in combination with host 2012-12-16 20:03:54 -03:00
Guillermo Rauch
9cc22171de manager: fixed disconnect 2012-12-16 19:45:23 -03:00
Guillermo Rauch
d574b7c0db manager: nicer? cleanup impl 2012-12-16 19:45:13 -03:00
Guillermo Rauch
1583c712b0 manager: implemented on 2012-12-16 19:41:35 -03:00
Guillermo Rauch
f4c7eb619a socket: implemented on 2012-12-16 19:41:22 -03:00
Guillermo Rauch
169ba2b94d on: added helper
should make its own component
2012-12-16 19:41:07 -03:00
Guillermo Rauch
07afc2e8fb manager: implemented on 2012-12-16 19:38:56 -03:00
Guillermo Rauch
137d87b375 manager: prevent socket function override 2012-12-16 19:38:25 -03:00
Guillermo Rauch
b711dd9889 manager: added missing module.exports 2012-12-16 19:38:15 -03:00
Guillermo Rauch
068b044017 manager: added on dep 2012-12-16 19:38:07 -03:00
Guillermo Rauch
8d75aed8f9 emitter: remove on override 2012-12-16 19:32:34 -03:00
Guillermo Rauch
b7415ae618 index: fixed url dep 2012-12-16 19:25:53 -03:00
Guillermo Rauch
ac9cb14733 manager: simplify API 2012-12-14 09:45:24 -03:00
Guillermo Rauch
7d205214f0 socket: added onack instrumentation 2012-12-13 10:52:12 -03:00
Guillermo Rauch
3bcdba0b4c socket: fixed event emitting instrumentation 2012-12-13 10:46:06 -03:00
Guillermo Rauch
a6820e3a0d socket: improved style 2012-12-13 10:35:32 -03:00
Guillermo Rauch
2301884730 url: support for io() 2012-12-13 10:12:19 -03:00
Guillermo Rauch
19e8048ec5 socket: don't emit open and close 2012-12-13 10:05:46 -03:00
Guillermo Rauch
d523a25cc0 socket: emit events after connect fires 2012-12-13 10:05:09 -03:00
Guillermo Rauch
0ce8934eed socket: turn acks into an object 2012-12-13 08:51:16 -03:00
Guillermo Rauch
60a17801f9 socket: do not remove event name from args 2012-12-13 08:47:05 -03:00
Guillermo Rauch
1a27ddb583 socket: make events public for plugins to extend 2012-12-13 08:12:28 -03:00
Guillermo Rauch
510538813d url: finished module with tests 2012-12-10 18:31:54 -03:00
Guillermo Rauch
a0c6f36f94 index: fix source exposure 2012-12-10 14:28:44 -03:00
Guillermo Rauch
d5652feadc 1.0 client initial commit 2012-12-10 03:31:57 -03:00