Created
April 17, 2015 06:35
-
-
Save adicirstei/1cd7d4888a91c39a466b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var axon = require('axon'); | |
var sock = axon.socket('pub'); | |
sock.bind(3000); | |
console.log('pub server started'); | |
setInterval(function(){ | |
sock.send('hello'); | |
}, 500); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var axon = require('axon'); | |
var sock = axon.socket('sub'); | |
sock.connect(3000); | |
sock.on('message', function(msg){ | |
console.log(msg.toString()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment