class Pantry::Communication::PublishSocket
The PublishSocket
handles the Publish side of Pub/Sub using a 0MQ PUB socket. Messages can be published to all listening clients or can be filtered to certain clients using a ClientFilter
. See SubscribeSocket
for the receiving end.
Public Instance Methods
build_socket()
click to toggle source
# File lib/pantry/communication/publish_socket.rb, line 10 def build_socket Celluloid::ZMQ::PubSocket.new end
open_socket(socket)
click to toggle source
# File lib/pantry/communication/publish_socket.rb, line 14 def open_socket(socket) socket.bind("tcp://#{host}:#{port}") end