Commit Graph

38 Commits

Author SHA1 Message Date
Jérémy Lal
7e50871c41 [chore] Use uws as default wsEngine, and ws as fallback (#459) 2016-12-12 22:02:03 +01:00
Diga Widyaprana
7cbdd5e5d9 [style] Add ESlint (#385) 2016-10-31 02:40:58 +01:00
DavidCai
829c4b5ec1 Fix a small typo
Fix a small typo
2015-09-24 15:03:57 +08:00
Roman Shtylman
48f006f947 make require('engine.io')() return a new Server instance
fixes #212
2014-06-04 13:45:48 -04:00
Roman Shtylman
cb2b80afd9 remove lib/index.js
Needless level of indirection which blocks actually reading the
important parts of the code.
2014-06-04 13:45:47 -04:00
Roman Shtylman
d3ed8418a8 remove unused require 2014-06-04 13:45:47 -04:00
Roman Shtylman
d74f93e4f9 add Server.attach method
This method does what engine.attach use to do but is now on the
instantiated server instance. This makes it possible to create engine.io
servers without yet attaching them to any active http server.

When creating a project which will server static files/pages alongside
engine.io on the same domain/process this makes it easier to separate
logic into files without having to pass around the http server.
2014-06-04 13:45:43 -04:00
Guillermo Rauch
10261c5211 removed flashsocket, moving to userland 2014-05-17 15:24:40 -07:00
Amir Abu Shareb
a2fff6fcab don't use __proto__, closes #170 2013-07-03 15:48:17 +03:00
stephen-bradshaw
f2bc5190b4 fix spelling errors 2013-02-08 09:27:52 +00:00
Roman Shtylman
fd36eeaf02 Only end upgrade socket connections if unhandled
This fixes an issue where multiple engine.io instances (on different
paths) would result in the closing of websocket connections for all of
the instances. This happened because each engine.io instance would
register an `upgrade` handler on the server. This handler would check
for a matching path and otherwise call `socket.end()` Since multiple
upgrade events would be triggered with different paths, the peer
handlers would close each other.

This patch resolves this behavior in the following way:
- When an instance upgrade handler encounters a path which it does not
  recognize it creates a timeout for `destroyUpgradeTimeout`.
- At the end of the timeout, the socket is checked for writable state
  and bytes written. If there has been not activity and the socket is
  writable, then it will be ended.

This allows for peer socket handlers to keep the socket alive by sending
some data over it. This also mimics the core node behavior of closing
sockets on upgrade when no handler is specified. We consider not
handling an upgrade request similar to no handler. However, we cannot
immediately end the socket for the reasons noted above.

fixes #143
2013-01-31 22:42:11 -05:00
Sweet
b69264dad9 Removed the lib/index in all the files 2013-01-19 14:27:17 -08:00
Sweet
90c0cd0e3f parser.js: deleted
package.json: updated the version for the client
everything else: fixed paths/requirements to the new protocol/parser repo
2013-01-19 13:14:00 -08:00
Guillermo Rauch
95ded5d885 engine.io: style 2012-12-17 08:45:14 -03:00
Guillermo Rauch
01e06d7a4f engine.io: cleanup 2012-12-16 20:35:54 -03:00
Guillermo Rauch
c59bb42e85 engine.io: deprecated resource 2012-12-16 20:25:08 -03:00
Guillermo Rauch
73c772d0b3 Revert "engine.io: added middleware attachment possibility (eg: for express)"
This reverts commit 7b3243dbea.
2012-12-16 18:49:06 -03:00
Guillermo Rauch
7b3243dbea engine.io: added middleware attachment possibility (eg: for express) 2012-12-13 12:29:37 -03:00
Guillermo Rauch
971199d19b engine.io: some cleanup 2012-11-04 09:20:47 -08:00
Andor Goetzendorff
7f08ee3f50 invoking as a function causes attach, refs #104 2012-10-29 13:40:07 +01:00
Guillermo Rauch
aa6fe32b59 Removed version since we're not supporting 0.4 from the get-go. Use require('engine.io/package').version instead. 2012-07-03 12:46:40 -07:00
Guillermo Rauch
ce99f057a2 Fixed engine.io for 0.7 2012-06-05 15:05:19 +02:00
Guillermo Rauch
b8cca35434 Added instrumentation to core 2012-04-03 08:16:05 -03:00
Guillermo Rauch
4f689687e6 Implemented resource 2012-04-02 12:17:22 -03:00
Guillermo Rauch
bd19365452 Exposed parser. 2012-03-03 18:41:11 -03:00
Guillermo Rauch
97c84e5e4a Fixed indentation. 2012-02-26 16:47:25 -03:00
Guillermo Rauch
5e0dd8bb35 Upon http server close, close all engine open clients (attach) 2012-01-03 10:30:23 -08:00
Guillermo Rauch
7f764a7c73 Added raw http socket handling for flashsocket 2011-12-29 12:58:42 -05:00
Guillermo Rauch
fc65b94d84 refactored websocket upgrade handler in attach. 2011-12-29 12:58:21 -05:00
Guillermo Rauch
f27e66604f Fixed restoration of old listeners when attaching engine.io 2011-12-29 12:49:46 -05:00
Guillermo Rauch
7418142c0d Fixed style 2011-12-29 12:48:49 -05:00
Guillermo Rauch
c581ccad54 Fixed type checking of arguments for engine#listen 2011-12-29 12:48:26 -05:00
Guillermo Rauch
49f9adc208 Revamped exports 2011-12-29 12:47:18 -05:00
Guillermo Rauch
fe9316e6e9 Export protocol revision from main file 2011-12-29 12:44:55 -05:00
Guillermo Rauch
55a462a72a Added http dependency to engine.io 2011-12-29 12:44:23 -05:00
Guillermo Rauch
c9d6a15595 Fixed handleRequest usage 2011-12-23 13:28:38 -08:00
Guillermo Rauch
a9b3b9638f Fixed typo 2011-12-21 18:30:00 -08:00
Guillermo Rauch
40e7c626f0 Rename 2011-12-21 18:29:40 -08:00