Commit Graph

206 Commits

Author SHA1 Message Date
Zheng Weihan
4578f7ed35 Merge branch 'orgmaster' into queryStringFix
* orgmaster: (44 commits)
  bump zuul
  Remove jspm browser config
  Run lint before test instead of before build
  ESlint manual fix
  Eslint autofix
  Add env to eslintrc
  Exclude generated files from linting
  updated babel-eslint dep to 4.1.7 (4.1.6 broken)
  refactor gulpfile
  Add eslint to gulpfile and create gulp task default
  fixed regex
  Rename gulp task webpack to build
  Remove commented make recipe
  removed babel react preset
  Makefile use gulp from node_modules instead of global
  Remove browserify stuff, add zuul-builder-webpack devDep
  Migrate zuul config from yml to js
  Refactor webpack config out to support/webpack.config.js
  removed ide-specific entries from gitignore
  updated makefile to use gulp commands
  ...

Conflicts:
	lib/manager.js
	lib/socket.js
2016-04-12 19:17:09 +08:00
Diga Widyaprana
d1cbc68ea7 Eslint autofix 2016-02-28 02:36:06 +08:00
Zheng Weihan
05250b0f5b code modification to conform to style guide. 2016-02-13 11:25:28 +08:00
Zheng Weihan
08e44f3ae4 fix bug and passes tests 2016-01-31 14:45:20 +08:00
Zheng Weihan
8d44b7a938 pass query as Socket property rather than as function params to simplify flow and handle complex event flow. 2016-01-31 14:24:38 +08:00
Zheng Weihan
75467cd069 Issue #331, attach query string to CONNECT packets for secondary namespaces. 2016-01-28 14:34:00 +08:00
nkzawa
41956806a7 fix a socket can't connect while disconnecting a different one 2015-12-03 17:44:47 +09:00
nkzawa
ba45dd5211 remove compress option from packets 2015-12-01 20:47:28 +09:00
Guillermo Rauch
e29f668caa Merge pull request #832 from lattmann/fix/apply_not_defined
Use the same onack logic on client side what server uses.
2015-04-06 11:02:44 -07:00
Zsolt Lattmann
4d059c858c Two space indents for the code changes. 2015-04-06 10:11:45 -05:00
Guillermo Rauch
adbd0e3e36 added support for ping and pong events
https://github.com/Automattic/socket.io/issues/1951
2015-04-05 15:45:17 -07:00
Guillermo Rauch
61cb92a6fb style 2015-04-05 10:08:28 -07:00
Zsolt Lattmann
9115a5fd7a Use same onack function like it is in the server code. 2015-04-02 16:22:20 -05:00
Zsolt Lattmann
63cf9e76f6 Do not call apply if packet id is not in acks 2015-04-02 15:32:23 -05:00
Naoyuki Kanezawa
b15404e218 support compression 2015-01-22 06:51:49 +09:00
Tony Kovanen
b0c4c2edd0 Added socket.id property
- Make sure `socket.id` is defined on connect
- Make sure `socket.id` is cleared on disconnect
- Make sure `socket.id` is updated on reconnect
2015-01-14 18:18:02 +02:00
Naoyuki Kanezawa
a8b3fbea55 enable to stop reconnecting 2014-10-19 12:11:30 +09:00
Tony Kovanen
baf60c1502 Merge pull request #732 from nkzawa/patch-10
Enable to reconnect manually
2014-09-21 14:18:50 -06:00
Guillermo Rauch
1a9b168451 socket: fix in has-binary 2014-09-04 11:44:24 +02:00
Naoyuki Kanezawa
a0f63d7408 enable to reconnect manually 2014-07-21 02:20:22 +09:00
Naoyuki Kanezawa
8cc2f57451 fix autoConnect option 2014-07-16 03:59:43 +09:00
Tony Kovanen
ecc7ba8bda Only add subs once to begin with, so no need for an if for every .connect() call 2014-06-18 23:16:45 +03:00
Tony Kovanen
e5416ff741 Don't readd subs when reconnecting 2014-06-18 22:48:22 +03:00
Guillermo Rauch
1d8630a874 socket: whitelist connect_error and connect_timeout (fixes #534) 2014-06-17 08:08:52 -07:00
Guillermo Rauch
f4c65a6ba0 Merge pull request #692 from rase-/add/reconnection-events-to-socket
Reconnection events propagated to socket
2014-06-13 11:26:57 -07:00
Tony Kovanen
be3f3c4bb5 Use blacklist instead of internal emit function 2014-06-13 21:21:28 +03:00
Guillermo Rauch
544aae4079 Merge pull request #682 from kevin-roark/add/emit-buffer
add a buffer for emitted events to only send after connection
2014-06-13 10:10:34 -07:00
Tony Kovanen
a20671c511 Propagate reconnection events to socket from manager 2014-06-13 03:28:38 +03:00
Reid Burke
e07cec53a0 Merge branch 'deps' of github.com:davglass/socket.io-client into deps
Conflicts:
	package.json
2014-06-04 15:20:44 -07:00
Kevin Roark
8e76ec1717 add a buffer for emitted events to only send after connection 2014-06-01 23:18:02 -07:00
Kevin Roark
b43ef06adf distinction between ACK and BINARY_ACK 2014-05-30 18:42:42 -07:00
Dav Glass
64de64cb91 component-emitter@1.1.2, component-bind@1.0.0 2014-05-29 08:54:14 -05:00
Naoyuki Kanezawa
696fc5211b set the sent flag to true 2014-03-04 22:58:01 +09:00
Guillermo Rauch
a2812f7b15 Merge branch 'master' of github.com:LearnBoost/socket.io-client 2014-03-03 22:22:28 -08:00
Guillermo Rauch
94b5387e49 fix reconnection 2014-03-03 22:21:21 -08:00
Guillermo Rauch
265401680d Merge pull request #633 from nkzawa/patch-3
Fix undefined packet type
2014-03-03 22:13:33 -08:00
Guillermo Rauch
502ef414a7 bunch of reconnection fixes 2014-03-03 17:32:33 -08:00
Naoyuki Kanezawa
a3ae721aae fix undefined packet type 2014-03-02 16:17:11 +09:00
Naoyuki Kanezawa
fc4cdb40e7 Merge remote-tracking branch 'upstream/master' into patch-2
Conflicts:
	test/connection.js
2014-03-02 06:22:07 +09: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
Naoyuki Kanezawa
78f1fd152f fix a namespace connection error 2014-02-09 03:19:28 +09: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
39d5e20944 switch to browserify 2013-12-25 16:00:27 -03:00
Guillermo Rauch
558f8b2626 socket: improve keeping track of connected state 2012-12-24 19:51:17 -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