Sha256: 1e35399aed9d2b37585f141d72733e27539bf5d71071c755061ac66ec32f7713
Contents?: true
Size: 486 Bytes
Versions: 12
Compression:
Stored size: 486 Bytes
Contents
require 'dripdrop/node' Thread.abort_on_exception = true DripDrop::Node.new do z_addr = 'tcp://127.0.0.1:2200' zmq_pull(z_addr, :connect).on_recv do |message| puts "Receiver 2 #{message.body}" end zmq_pull(z_addr, :connect).on_recv do |message| puts "Receiver 1 #{message.body}" end push = zmq_push(z_addr, :bind) i = 0 EM::PeriodicTimer.new(1) do i += 1 puts i push.send_message(:name => 'test', :body => "Test Payload #{i}") end end.start!
Version data entries
12 entries across 12 versions & 1 rubygems