Skip to content

Instantly share code, notes, and snippets.



Last active Dec 20, 2015
What would you like to do?
Gossip MessageStream usage
var stream = hub.sendAll('check-temp');
stream.on('error', function (err) {
// called when there are errors - ex: missing ack / reply timeout
stream.on('ack', function (ackMsg) {
// not sure how useful this is
stream.on('acked', function () {
// emitted when all hubs sent back acks
stream.on('reply', function (msg) {
// called when a reply is received
stream.on('end', function () {
// no more messages will be received
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment