Skip to content

Instantly share code, notes, and snippets.

@adicirstei
Created April 17, 2015 06:35
Show Gist options
  • Save adicirstei/1cd7d4888a91c39a466b to your computer and use it in GitHub Desktop.
Save adicirstei/1cd7d4888a91c39a466b to your computer and use it in GitHub Desktop.
var axon = require('axon');
var sock = axon.socket('pub');
sock.bind(3000);
console.log('pub server started');
setInterval(function(){
sock.send('hello');
}, 500);
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