class AgentZMQ::PubAgent

Public Class Methods

new(name) click to toggle source
# File lib/agent_zmq/agents/pub_agent.rb, line 6
def initialize name
  @name=name
  @socket_opts=[]
end

Public Instance Methods

publish(msg) click to toggle source
# File lib/agent_zmq/agents/pub_agent.rb, line 24
def publish msg
  AgentZMQ::Helpers.publish zmq_socket, msg
end
reset() click to toggle source
# File lib/agent_zmq/agents/pub_agent.rb, line 28
def reset

end
sock_type() click to toggle source
# File lib/agent_zmq/agents/pub_agent.rb, line 11
def sock_type
  zmq_context.socket(ZMQ::PUB)
end
start() click to toggle source
# File lib/agent_zmq/agents/pub_agent.rb, line 15
def start
  zmq_socket
  sleep 0.8 # slow joiner
end
stop() click to toggle source
# File lib/agent_zmq/agents/pub_agent.rb, line 20
def stop
  zmq_socket.close
end