Commit Graph

7693 Commits

Author SHA1 Message Date
Guillermo Rauch
571f3a663c package: bump socket.io-client for new build 2014-03-01 10:18:33 -08:00
Guillermo Rauch
4cdfe187b2 build 2014-03-01 10:18:05 -08:00
Guillermo Rauch
8865ea180a package: bump socket.io 2014-03-01 09:33:07 -08:00
Guillermo Rauch
45c5abc7d6 add badge 2014-03-01 09:08:24 -08:00
Guillermo Rauch
d293e3be7c version badge 2014-03-01 09:00:34 -08:00
Guillermo Rauch
e2a5e4b1f2 package: adjust socket.io-client 2014-03-01 08:55:50 -08:00
Guillermo Rauch
f6ffa50e04 package: adjust socket.io 2014-03-01 08:55:27 -08:00
Guillermo Rauch
7b4c8c67c2 package: bump parser 2014-03-01 08:55:05 -08:00
Guillermo Rauch
f602e4e5c2 package: bump parser 2014-03-01 08:54:53 -08:00
Guillermo Rauch
e280e17094 Merge pull request #1432 from kevin-roark/add/better-binary-events
Updated protocol-facing code for new binary protocol
2014-03-01 08:53:49 -08:00
Guillermo Rauch
2c0bb5d451 Merge pull request #629 from kevin-roark/add/better-binary-events
Updated protocol-facing code to reflect new binary protocol
2014-03-01 08:53:43 -08:00
Guillermo Rauch
3283b89c4e Release 2.1.0 2014-03-01 08:32:23 -08:00
Guillermo Rauch
947d7b4ea5 Merge pull request #1437 from keyosk/master
Update chat example
2014-03-01 08:21:53 -08:00
Cody Massin
318d62e5ad When displaying leave and join messages show a message with an updated participants count.
Signed-off-by: Cody Massin <keyosk@gmail.com>
2014-03-01 00:20:51 -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
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
fc34c7d7a4 Updated protocol-facing code to reflect newest parser
Socket.io-parser now has a class-based Encoder and Decoder scheme,
so client.js was changed appropriately.

The main difference is that most of the logic for interpreting packets
is now isolated to parser, and client receives a 'decoded' event when
parser has a reconstructed packet ready to go.
2014-02-27 17:54:02 -05: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
Kevin Roark
2f526f7a68 Updated Readme for version 3
Version 3 is the protocol that supports the newest binary-handling
parser.
2014-02-26 21:24:45 -05:00
Guillermo Rauch
53f9dce1a1 Merge branch 'master' of github.com:LearnBoost/socket.io-protocol
Conflicts:
	index.js
2014-02-26 14:59:48 -08:00
Kevin Roark
449c28ce1c Updated protocol-facing code for new binary protocol
This is a squash of four boring commits. The gist is that client.js
encoding and decoding stuff was updated to take an array of encoded packets
to write, and to handle sequences of binary packets to decode. There was
also merging done with upstream. All tests are passing.
2014-02-26 13:45:47 -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
Guillermo Rauch
9249b76e40 Merge pull request #4 from kevin-roark/fix/global-buffer-check
Added a check for global.Buffer before .isBuffer
2014-02-24 17:49:59 -08:00
Kevin Roark
bc162313a1 Added a check for global.Buffer before .isBuffer
Need this check for the future where we remove the browserify insertion
of Buffer. It is also cleaner to check, I believe.
2014-02-24 20:33:31 -05:00
Guillermo Rauch
3faca287a5 chat: forward 3000 2014-02-24 16:54:48 -08:00
Guillermo Rauch
266278d14c prettify 2014-02-24 16:46:23 -08:00
Guillermo Rauch
d286ba2064 rename app->index 2014-02-24 16:28:04 -08:00
Guillermo Rauch
d4ec1b6ff0 use shorthand io call 2014-02-24 16:27:46 -08:00
Guillermo Rauch
49f11f9cf5 README: move to index 2014-02-24 16:27:37 -08:00
Guillermo Rauch
b33afd6455 build 2014-02-24 11:13:10 -08:00
Luigi Pinca
81442ceea6 fix browserify options 2014-02-24 16:48:14 +01:00
Guillermo Rauch
39564b3594 fix dep 2014-02-23 09:30:26 -08:00
Guillermo Rauch
0ffdc7c397 add missing dependency in tests 2014-02-23 09:22:30 -08:00
Guillermo Rauch
7c9b0f9d58 fixed build 2014-02-23 09:17:11 -08:00
Guillermo Rauch
f26cc4cd00 travis: fix 2014-02-23 09:15:56 -08:00
GK
3011d31aa2 made parseJSON its own module, update calls 2014-02-22 18:51:09 -05:00
Guillermo Rauch
05fd23ddda Merge pull request #1430 from kevin-roark/fix/has-binary-dependency
fixed the has-binary-data dependency
2014-02-21 14:19:35 -08:00
Kevin Roark
d21b1f36a3 fixed the has-binary-data dependency 2014-02-21 17:10:53 -05:00
Guillermo Rauch
f34f4bb65b build 2014-02-21 13:40:48 -08:00
Guillermo Rauch
f753830874 package: bump socket.io 2014-02-21 13:32:47 -08:00
Guillermo Rauch
573b32cc7d package: bump client 2014-02-21 13:32:12 -08:00
Guillermo Rauch
c7ac4155ca Merge pull request #622 from kevin-roark/add/binary-support
Add/binary support
2014-02-21 13:18:30 -08:00
Guillermo Rauch
16d1afc7fc Merge pull request #1426 from brishin/binary
Binary
2014-02-21 13:02:26 -08:00
Guillermo Rauch
299bfcb533 Merge pull request #624 from Aaron1011/fix_node
Don't test on Node 0.8
2014-02-21 13:02:04 -08:00
Aaron Hill
f5c66b7c59 Don't test on Node 0.8
Zuul 1.5.2 doesn't seem to support it
2014-02-21 16:00:31 -05:00
Guillermo Rauch
c9e738e7c3 Merge pull request #623 from Aaron1011/node_11
Test against Node 0.11
2014-02-21 12:53:15 -08:00
Kevin Roark
2782221069 made text-blob-builder a module and added dev dependency 2014-02-20 18:31:19 -05:00