Skip to content
Browse files

now triggering an event when S2S is ready/bound and listening on newS…

…treams when they connect
  • Loading branch information...
1 parent a0e53e1 commit 3a2f6c36a39c2806f81aa0b6b2eef2845c2e35eb @julien51 julien51 committed Dec 23, 2011
Showing with 8 additions and 1 deletion.
  1. +7 −0 modules/logger.js
  2. +1 −1 modules/s2s.js
View
7 modules/logger.js
@@ -41,5 +41,12 @@ exports.configure = function(server, config) {
logger.info(format_log(client, "registration-failure " + jid));
});
});
+
+ server.on("s2sReady", function(s2s) {
+ // console.log("S2S ready");
+ s2s.on("newStream", function(stream) {
+ // console.log("New Stream");
+ });
+ });
}
}
View
2 modules/s2s.js
@@ -20,7 +20,7 @@ exports.configure = function(server, config) {
server.router.route(stanza);
});
server.s2s = s2s;
-
+ server.emit("s2sReady", s2s);
server.router.on("externalUser", function(stanza) {
s2s.send(stanza); // this is for S2S.
});

0 comments on commit 3a2f6c3

Please sign in to comment.
Something went wrong with that request. Please try again.