Method: Pantry::Communication::FileService#initialize
- Defined in:
- lib/pantry/communication/file_service.rb
#initialize(server_host, port, security) ⇒ FileService
Returns a new instance of FileService.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/pantry/communication/file_service.rb', line 28 def initialize(server_host, port, security) @host = server_host @port = port @socket = Celluloid::ZMQ::RouterSocket.new @socket.set(::ZMQ::ROUTER_MANDATORY, 1) @socket.identity = @identity = SecureRandom.uuid Communication.configure_socket(@socket) @security = security @security.configure_socket(@socket) @receiver = FileService::ReceiveFile.new_link(self) @sender = FileService::SendFile.new_link(self) end |