Sha256: 2275bbc74ead3a2057de06a06445c2bde444c64137d55824c92866cde1780362
Contents?: true
Size: 419 Bytes
Versions: 1
Compression:
Stored size: 419 Bytes
Contents
require 'dripdrop/message' require 'zmq' require 'bert' class DripDrop class Agent attr_reader :address, :context, :socket def initialize(address) @address = address @context = ZMQ::Context.new(1) @socket = @context.socket(ZMQ::PUB) @socket.connect(@address) end def send_message(name,content) puts @socket.send(Message.new(name,content).encoded, 0) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dripdrop-0.0.2 | lib/dripdrop/agent.rb |