Sha256: 68db4930baca45207ed3601b42561c9c172a60604cf2f5328c5892f4de8e191b
Contents?: true
Size: 597 Bytes
Versions: 2
Compression:
Stored size: 597 Bytes
Contents
require 'dripdrop/node' Thread.abort_on_exception = true DripDrop::Node.new do addr = 'http://127.0.0.1:2200' i = 0 http_server(addr).on_receive do |msg,response| i += 1 response.send_message(msg) end EM::PeriodicTimer.new(1) do client = http_client(addr) msg = DripDrop::Message.new('http/status', :body => "Success #{i}") client.send_message(msg) do |resp_msg| puts "RESP: #{resp_msg.inspect}" end end #Keep zmqmachine from spinning around using up all our CPU by creating a socket req = zmq_xreq('tcp://127.0.0.1:2091', :connect) end.start!
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dripdrop-0.11.0-java | example/http.rb |
dripdrop-0.11.0 | example/http.rb |