Commit Graph

659 Commits

Author SHA1 Message Date
Damien Arrachequesne
2dcc794b8f [feature] Allow the use of a custom parser (#1075)
See https://github.com/socketio/socket.io/pull/2829
2017-02-20 21:46:02 +01:00
Jianru Lin
4322cf200f [docs] Fix typo (#1076) 2017-02-20 13:44:20 +01:00
Damien Arrachequesne
fcb5c43ffe [fix] Add nsp prefix to socket.id (#1058)
So the socket ids on the client and on the server are equals.
2017-01-13 16:53:44 +01:00
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
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
Zheng Weihan
e3c0f6a41e encodes queries using encodeURIComponent 2016-02-13 13:27:04 +08:00
Zheng Weihan
05250b0f5b code modification to conform to style guide. 2016-02-13 11:25:28 +08:00
Zheng Weihan
3290bb43f1 move encoding of query string to lookup function.
handles passing of query via query strings
add tests for functionality
2016-01-31 15:29:49 +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
18be967adb ipv6 support 2015-12-03 00:09:31 +09:00
nkzawa
ba45dd5211 remove compress option from packets 2015-12-01 20:47:28 +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
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
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
Guillermo Rauch
ffc12af647 added tests for same-namespace new connection handling (https://github.com/Automattic/socket.io/issues/1956) 2015-04-05 12:18:50 -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
Guillermo Rauch
210d65d9dd Merge pull request #803 from masakij/fix-port-hint
Fix port hint
2015-01-30 09:54:15 -08:00
Guillermo Rauch
fe49e1c780 Merge pull request #805 from nkzawa/compression
Support compression
2015-01-30 09:43:46 -08:00
Michael Luo
7d237cc91f bugfix/1956 don't reuse same-namespace connections #2 2015-01-24 20:14:49 -08:00
Michael Luo
2079467f5b bugfix/1956 don't reuse same-namespace connections 2015-01-23 14:05:06 -08:00
Naoyuki Kanezawa
b15404e218 support compression 2015-01-22 06:51:49 +09:00
masakij
5abd97b231 FIX: location.port was ignored
change location.hostname to location.host
2015-01-20 16:25:57 +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
Roman Shtylman
1e899abd45 fix url parsing when uri string is undefined
The url parser was ignoring port hints from window.location when the uri
string was undefined. This commit changes the parser to use
window.location.host (not hostname) so that the port is preserved.
2015-01-11 13:10:36 -08: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
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
7912f14c94 Merge pull request #754 from toshipon/patch-1
Support no schema relative url
2014-09-11 17:56:17 +03:00
Guillermo Rauch
1a9b168451 socket: fix in has-binary 2014-09-04 11:44:24 +02:00
toshipon
6a9144c226 Support no schema relative url 2014-08-30 18:43:32 +09: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
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
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