lib/ury_rapid/services/network_service.rb
# Begin running the service
#
# This function is always run within an EventMachine run block.
#
# @api
# @example  Run the network service.
#   ns.run
#
# @return [void]
Begin running the service
This function is always run within an EventMachine run block.
Begin running the service This function is always run within an EventMachine run block .
def run
        client = make_client(@queue, @host, @port)
        responder = make_responder(@requester)
        client.run(responder)
        initial_requests(@requester)
      end
def run client = make_client ( @queue , @host , @port ) responder = make_responder ( @requester ) client . run ( responder ) initial_requests ( @requester ) end
Begin running the service
This function is always run within an EventMachine run block.
Begin running the service This function is always run within an EventMachine run block .
# Most of the actual network server poking is contained inside this # client object, which is what hooks into the Rapid EventMachine # instance.  We need to give it access to parts of the service config # so it knows where and how to connect to the server. # The responder receives responses from downstream via the client and # reacts on them, either updating the model or asking the requester to # intervene. # Now we can run the client, passing it the responder so it can send # BAPS responses to it.  The client will get BAPS requests sent to it # via the queue, thus completing the communication paths. # Finally, the network service may wish to send some initial requests # to the downstream server here.
None
void
api
None
example
Run the network service. ns.run
Run the network service . ns . run