Commit Graph

55 Commits

Author SHA1 Message Date
Diga Widyaprana
c51a930a2c ESlint manual fix 2016-02-28 02:36:06 +08:00
Diga Widyaprana
d1cbc68ea7 Eslint autofix 2016-02-28 02:36:06 +08:00
nkzawa
41956806a7 fix a socket can't connect while disconnecting a different one 2015-12-03 17:44:47 +09:00
nkzawa
18be967adb ipv6 support 2015-12-03 00:09:31 +09:00
Guillermo Rauch
ef01b22ad9 manager: fix Object.prototype extensions 2015-11-25 09:55:43 -08:00
Xubor
627dda0ff6 Fix of reconnection stopping during disconnect 2015-06-18 22:30:44 +02: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
2a2866b049 proper handling of disconnection while in opening state 2015-04-05 12:20:13 -07:00
Guillermo Rauch
1e8e125d13 instrumentation / style tweaks 2015-04-05 12:19:51 -07: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
Mark Mokryn
e8c5779af6 improve fix for GH-786 plus test it and also backoff 2014-11-23 16:50:21 +02:00
Mark Mokryn
42f51126ff fixes GH-784 and GH-786 2014-11-23 01:56:58 +02:00
Tony Kovanen
512eb3a8a4 Set readyState before engine.io close event.
This way we don't need to possibly wait for a drain event before we
actually change the readyState and don't miss reconnects, which
currently happens when linked against the current engine.io-client
master.
2014-10-19 22:10:39 +03:00
Tony Kovanen
b5d808e0d6 Merge pull request #767 from nkzawa/patch-12
fix reconnection after reconnecting manually
2014-10-19 13:52:43 +03:00
Naoyuki Kanezawa
bf1fb628df fix reconnection after reconnecting manually 2014-10-19 12:14:18 +09:00
Naoyuki Kanezawa
a8b3fbea55 enable to stop reconnecting 2014-10-19 12:11:30 +09:00
Naoyuki Kanezawa
8cc2f57451 fix autoConnect option 2014-07-16 03:59:43 +09:00
Guillermo Rauch
f8afcce007 Merge pull request #680 from FredyC/add-auto-connect
Add autoConnect option
2014-06-21 18:12:41 -07:00
Tony Kovanen
05c96325fe Don't fire an extra reconnect when we're not reconnecting after a failed initial connect attempt 2014-06-21 17:22:34 +03:00
Tony Kovanen
041c95e40a Added tests and enhanced event propagation 2014-06-19 02:58:22 +03:00
Guillermo Rauch
1d8630a874 socket: whitelist connect_error and connect_timeout (fixes #534) 2014-06-17 08:08:52 -07:00
唐鳳
84da0c910e Handle io.connect(null, opts) correctly
In migrating to Socket.IO 1.0.x, we had to change `null` into `"/"` in:

```
io.connect(null, opts)
```

( See adbc86e529 (diff-d87f0347aff1316677a2d709ec4b4777R49) )

This is because `typeof null` is `object`, so the options are discarded.

Fixed by checking for truth value of `uri` before checking its type.
2014-06-14 06:26:42 +08:00
Tony Kovanen
3c6237f051 Rename propagateEvent to emitAll 2014-06-13 21:26:31 +03:00
Tony Kovanen
be3f3c4bb5 Use blacklist instead of internal emit function 2014-06-13 21:21:28 +03:00
Tony Kovanen
f15104dcba style 2014-06-13 20:27:39 +03:00
Tony Kovanen
57551c1462 Propagate events to sockets without an internal event listener in Manager 2014-06-13 14:14:57 +03:00
Tony Kovanen
109395ee34 Propagating reconnecting and reconnection events to socket 2014-06-13 03:45:41 +03:00
Tony Kovanen
a20671c511 Propagate reconnection events to socket from manager 2014-06-13 03:28:38 +03:00
FredyC
29cc049f37 add autoConnect option to wait with connecting 2014-06-01 09:32:06 +02:00
Dav Glass
64de64cb91 component-emitter@1.1.2, component-bind@1.0.0 2014-05-29 08:54:14 -05:00
Tony Kovanen
588d47e04d Reconnects in open if it fails 2014-03-12 15:13:25 +02:00
Guillermo Rauch
85e20509fc Merge pull request #635 from nkzawa/patch-4
Should call callback on open
2014-03-12 10:52:01 -02:00
Naoyuki Kanezawa
3ce84e2784 enable reconnection by default 2014-03-12 02:29:23 +09:00
Naoyuki Kanezawa
db638c2276 should call callback on open 2014-03-04 22:47:31 +09:00
Guillermo Rauch
94b5387e49 fix reconnection 2014-03-03 22:21:21 -08:00
Guillermo Rauch
502ef414a7 bunch of reconnection fixes 2014-03-03 17:32:33 -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
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
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
a2f172995c manager: keep count of connected clients to close underlying transport 2012-12-24 19:51:01 -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
dba6f18bdd manager: only accept a string as first parameter 2012-12-16 21:07:43 -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
07afc2e8fb manager: implemented on 2012-12-16 19:38:56 -03:00