Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

invoking as a function causes attach, refs #104

  • Loading branch information...
commit 7f08ee3f50905b927c8c6f36493cf5627a9b62c9 1 parent 82b16fa
Andor Goetzendorff ruxkor authored ruxkor committed
Showing with 16 additions and 1 deletion.
  1. +16 −1 lib/engine.io.js
17 lib/engine.io.js
View
@@ -1,4 +1,3 @@
-
/**
* Module dependencies.
*/
@@ -152,3 +151,19 @@ exports.attach = function (server, options) {
return engine;
};
+
+
+/**
+ * Invoking the library as a function delegates to attach
+ *
+ * @param {http.Server} server
+ * @param {Object} options
+ * @return {Server} engine server
+ * @api public
+ */
+
+module.exports = function() {
+ return exports.attach.apply(this, arguments);
+}
+
+module.exports.__proto__ = exports;
Please sign in to comment.
Something went wrong with that request. Please try again.