Permalink
Browse files

triggering an event when the router has been plugged

  • Loading branch information...
1 parent df25499 commit 1ea744b9a58a5af636946234d822d002a30cc7a7 @julien51 julien51 committed Dec 23, 2011
Showing with 5 additions and 0 deletions.
  1. +4 −0 modules/logger.js
  2. +1 −0 modules/router.js
View
@@ -48,5 +48,9 @@ exports.configure = function(server, config) {
// console.log("New Stream");
});
});
+
+ server.on("c2sRoutersReady", function(router) {
+ // console.log("Router ready")
+ })
}
}
View
@@ -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);
}

0 comments on commit 1ea744b

Please sign in to comment.