Commit Graph

139 Commits

Author SHA1 Message Date
Kevin Roark
4e33d6a6c5 Less indentation and a small optimization
The optimization is the "else if" instead of "if" for checking
array in _removeBlobs. No need to iterate over keys of a blob.
2014-05-31 22:41:12 -07:00
Guillermo Rauch
2997b08ce3 Release 2.2.0 2014-05-30 21:11:00 -07:00
Guillermo Rauch
8acf2452de Merge pull request #14 from kevin-roark/add/binary-ack
added a BINARY_ACK type
2014-05-30 20:43:23 -07:00
Kevin Roark
ca4f42a922 added a BINARY_ACK type 2014-05-30 18:41:47 -07:00
Guillermo Rauch
aaf07313c6 Release 2.1.5 2014-05-24 11:37:02 -07:00
Guillermo Rauch
cf16eca0f7 Merge pull request #11 from rase-/fix/date
don't iterate keys of date objects
2014-05-24 11:22:14 -07:00
Tony Kovanen
e2fb6e58c8 don't iterate keys of date objects 2014-05-24 19:33:30 +03:00
Guillermo Rauch
993b2b0240 Release 2.1.4 2014-05-17 13:50:54 -07:00
Guillermo Rauch
005a55026e Merge pull request #10 from kevin-roark/fix/null-reconstruction-bug
fix null reconstruction bug
2014-05-17 13:36:50 -07:00
Kevin Roark
6d3218eb3a fix null reconstruction bug 2014-05-15 10:51:39 -04:00
Guillermo Rauch
aea5477c43 Release 2.1.3 2014-04-27 18:45:57 -07:00
Guillermo Rauch
8313b3f7dc Merge pull request #9 from rase-/bump/zuul
Bump zuul version
2014-04-17 17:14:59 -07:00
Tony Kovanen
11edc45624 Bump zuul version 2014-04-18 03:05:57 +03:00
Guillermo Rauch
1327863d1f Merge pull request #8 from kevin-roark/add/docs
added documentation with a few examples
2014-03-26 14:49:15 -03:00
Kevin Roark
1771ee75e1 added documentation with a few examples 2014-03-26 13:47:47 -04:00
Guillermo Rauch
e0a30f3416 Merge pull request #7 from kevin-roark/update/protocol-version
updated protocol version
2014-03-24 16:14:06 -03:00
Kevin Roark
ed7cd9410c updated protocol version 2014-03-24 14:55:35 -04:00
Guillermo Rauch
4f2916b5a6 Release 2.1.2 2014-03-06 17:37:57 -06:00
Guillermo Rauch
e247e937fe Merge pull request #6 from kevin-roark/add/binary-ack-support
Encoding ack packets as binary
2014-03-06 17:23:50 -06:00
Kevin Roark
c8cce3e8c0 removed the 'in' slowness 2014-03-06 17:24:58 -05:00
Kevin Roark
2f729e07b4 Encoding ack packets as binary
So that arbitrary data can be passed back and forth in ack callbacks.
2014-03-06 16:52:08 -05:00
Guillermo Rauch
b8d7885a0e Release 2.1.1 2014-03-04 23:18:59 -08:00
Guillermo Rauch
1b7b04bfba Merge pull request #5 from kevin-roark/fix/remove-blob-object-check
Fix/remove blob object check
2014-03-04 23:15:44 -08:00
Kevin Roark
ba64f07bca Removed has-binary-data dependency
And replaced it with better isBuf function. Has binary data would not have
checked objects that contain blobs. isBuf only checks the current object,
not its child objects
2014-03-05 00:20:52 -05:00
Kevin Roark
47df0694f5 Fixed the object check in binary.removeBlobs
Remove blobs has to iterate over a javascript object and asynchronously
remove the blobs / files. It does this by iterating over arrays and
objects in the larger object recursively.

Problem was in checking for object to iterate over, wasn't checking if
that object was binary data itself. So it was working, but really slowly,
by iterating over every byte in a Buffer and checking it for blobs.
Much faster now :)
2014-03-04 23:50:36 -05:00
Guillermo Rauch
3283b89c4e Release 2.1.0 2014-03-01 08:32:23 -08:00
Guillermo Rauch
dd4b822426 Merge pull request #4 from kevin-roark/add/class-based-protocol
Protocol is now class-based
2014-02-27 15:09:14 -08:00
Kevin Roark
5bea0bf41c Protocol is now class-based
Separated the encoding and decoding into two public-facing objects,
Encoder and Decoder.

Both objects take nothing on construction. Encoder has a single method,
encode, that mimics the previous version's function encode (takes a
packet object and a callback). Decoder has a single method too, add, that
takes any object (packet string or binary data). Decoder emits a 'decoded'
event when it has received all of the parts of a packet. The only
parameter for the decoded event is the reconstructed packet.

I am hesitant about the Encoder.encode vs Decoder.add thing. Should it be
more consistent, or should it stay like this where the function names are
more descriptive?

Also, rewrote the test helper functions to deal with new event-based
decoding. Wrote a new test in test/arraybuffer.js that tests for memory
leaks in Decoder as well.
2014-02-27 17:46:20 -05:00
Guillermo Rauch
101aeabdb8 Merge pull request #3 from kevin-roark/add/new-binary-parsing
A faster and smaller binary parser and protocol
2014-02-27 12:15:10 -08:00
Guillermo Rauch
027c73b91b remove old credentials 2014-02-27 12:14:52 -08:00
Kevin Roark
299849b002 A faster and smaller binary parser and protocol
This is a squash of a few commits. Below is a small summary of commits.

Results from it: before the build size of socket.io-client was ~250K.
Now it is ~215K.
Tests I was doing here
(https://github.com/kevin-roark/socketio-binaryexample/tree/speed-testing)
take about 1/4 - 1/5 as long with this commit compared to msgpack.

The first was the initial rewrite of the encoding, which removes msgpack
and instead uses a sequence of engine.write's for a binary event. The
first write is the packet metadata with placeholders in the json for
any binary data. Then the following events are the raw binary data that
get filled by the placeholders.

The second commit was bug fixes that made the tests pass.

The third commit was removing unnecssary packages from package.json.

Fourth commit was adding nice comments, and 5th commit was merging
upstream.

The remaining commits involved merging with actual socket.io-parser,
rather than the protocol repository. Oops.
2014-02-26 22:31:39 -05:00
Guillermo Rauch
36f8aa8355 updated credentials 2014-02-20 13:56:43 -08:00
Guillermo Rauch
fd1018b92a Merge pull request #1 from rase-/add/zuul
Added zuul config and made testing work on browsers
2014-02-20 13:54:56 -08:00
Tony Kovanen
4e8db59871 Configured npm test 2014-02-20 13:08:04 +02:00
Tony Kovanen
85f8f98699 Added a couple of tests with Blobs for issue #2 2014-02-20 12:39:56 +02:00
Tony Kovanen
42cc5d2cff Added zuul config and made testing work on browsers 2014-02-20 12:18:21 +02:00
Guillermo Rauch
5efe005679 Release 2.0.0 2014-02-19 16:51:16 -08:00
Guillermo Rauch
861b60ef26 package: fix github url 2014-02-19 15:26:55 -08:00
Guillermo Rauch
86725d1e92 moved from socket.io-protocol 2014-02-19 15:26:26 -08:00