Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

triggering an event when the router has been plugged

  • Loading branch information...
commit 1ea744b9a58a5af636946234d822d002a30cc7a7 1 parent df25499
@julien51 julien51 authored
Showing with 5 additions and 0 deletions.
  1. +4 −0 modules/logger.js
  2. +1 −0  modules/router.js
View
4 modules/logger.js
@@ -48,5 +48,9 @@ exports.configure = function(server, config) {
// console.log("New Stream");
});
});
+
+ server.on("c2sRoutersReady", function(router) {
+ // console.log("Router ready")
+ })
}
}
View
1  modules/router.js
@@ -122,4 +122,5 @@ exports.configure = function(server, config) {
});
});
server.router = router; // We attach the router to the server. (Maybe we want to use an event for this actually to indicate that a new router was attached to the server?)
+ server.emit("c2sRoutersReady", router);
}
Please sign in to comment.
Something went wrong with that request. Please try again.