Method: Pantry::Communication::Client#run
- Defined in:
- lib/pantry/communication/client.rb
#run ⇒ Object
Start up the networking layer, opening up sockets and getting ready for communication.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/pantry/communication/client.rb', line 17 def run @security = Communication::Security.new_client @subscribe_socket = Communication::SubscribeSocket.new_link( Pantry.config.server_host, Pantry.config.pub_sub_port, @security ) @subscribe_socket.add_listener(self) @subscribe_socket.filter_on(@listener.filter) @subscribe_socket.open @send_socket = Communication::SendSocket.new_link( Pantry.config.server_host, Pantry.config.receive_port, @security ) @send_socket.open @file_service = Communication::FileService.new_link( Pantry.config.server_host, Pantry.config.file_service_port, @security ) @file_service.start_client end |