Class: Pantry::Communication::SendSocket
- Inherits:
-
WritingSocket
- Object
- WritingSocket
- Pantry::Communication::SendSocket
- Defined in:
- lib/pantry/communication/send_socket.rb
Overview
The SendSocket allows one-way asynchronous communication to the server. This is implemented through the ZMQ DEALER socket, which communicates with the Server’s ROUTER socket.
Instance Attribute Summary
Attributes inherited from WritingSocket
Instance Method Summary collapse
Methods inherited from WritingSocket
#close, #initialize, #open, #send_message
Constructor Details
This class inherits a constructor from Pantry::Communication::WritingSocket
Instance Method Details
#build_socket ⇒ Object
9 10 11 |
# File 'lib/pantry/communication/send_socket.rb', line 9 def build_socket Celluloid::ZMQ::DealerSocket.new end |
#open_socket(socket) ⇒ Object
13 14 15 |
# File 'lib/pantry/communication/send_socket.rb', line 13 def open_socket(socket) socket.connect("tcp://#{host}:#{port}") end |