Module: Pantry::Communication

Defined in:
lib/pantry/communication.rb,
lib/pantry/communication/client.rb,
lib/pantry/communication/server.rb,
lib/pantry/communication/security.rb,
lib/pantry/communication/wait_list.rb,
lib/pantry/communication/send_socket.rb,
lib/pantry/communication/file_service.rb,
lib/pantry/communication/client_filter.rb,
lib/pantry/communication/publish_socket.rb,
lib/pantry/communication/reading_socket.rb,
lib/pantry/communication/receive_socket.rb,
lib/pantry/communication/writing_socket.rb,
lib/pantry/communication/subscribe_socket.rb,
lib/pantry/communication/serialize_message.rb,
lib/pantry/communication/file_service/send_file.rb,
lib/pantry/communication/security/null_security.rb,
lib/pantry/communication/security/authentication.rb,
lib/pantry/communication/security/curve_security.rb,
lib/pantry/communication/security/curve_key_store.rb,
lib/pantry/communication/file_service/receive_file.rb,
lib/pantry/communication/file_service/file_progress.rb

Overview

The Communication subsystem of Pantry is managed via 0MQ through the Celluloid::ZMQ library.

Defined Under Namespace

Modules: Security Classes: Client, ClientFilter, FileService, PublishSocket, ReadingSocket, ReceiveSocket, SendSocket, SerializeMessage, Server, SubscribeSocket, WaitList, WritingSocket

Class Method Summary collapse

Class Method Details

.configure_socket(socket) ⇒ Object

Configure a ZMQ socket with some common options



9
10
11
12
13
14
15
16
17
# File 'lib/pantry/communication.rb', line 9

def self.configure_socket(socket)
  # Ensure the socket doesn't spam us trying to reconnect
  # after a disconnect or authentication failure
  socket.set(::ZMQ::RECONNECT_IVL,     1_000)
  socket.set(::ZMQ::RECONNECT_IVL_MAX, 30_000)

  # Drop all messages on shutdown
  socket.linger = 0
end