Not sure if this helps, but I also experimented with zmq in node and made a few comments:
I use four machines: 1: OS X 10.8.3 2: Ubuntu 12.10 in VM (bridge) 3: separate Ubuntu 12.04 machine
4: standalone Ubuntu 12.04 machine
When I run the same test server on all machines (not too different from your code above) Machine 1: sees updates from machines 3 and 4 Machine 2: sees updates from 1, 2, 3 and 4 Machine 3: sees updates from 1, 3, 4 Machine 4: sees updates from 1, 3, 4
therefore, it seems that OS X blocks are broadcasting for themselves. Ubuntu 12.10 on the virtual machine gets everyone, but it has problems with sending (perhaps related to running in VM?), And other machines get their own.
My server / client:
os = require 'os' zmq = require 'zmq' client = zmq.socket "sub" server = zmq.socket "pub" client.connect "epgm://224.0.0.1:5555", (error) -> if error? console.log "client error:", error client.subscribe "" client.on "message", (buffer) -> console.log "received ping:", buffer.toString! server.bind "epgm://224.0.0.1:5555", (error) -> if error? console.log "server error:", error setInterval ( -> server.send "#{os.hostname!}" ), 1000 process.on "SIGINIT", -> client.close! server.close! process.exit!
source share