Method: Arachni::Processes::Dispatchers#connect
- Defined in:
- lib/arachni/processes/dispatchers.rb
#connect(url, options = { }) ⇒ RPC::Client::Dispatcher
Connects to a Dispatcher by URL.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/arachni/processes/dispatchers.rb', line 35 def connect( url, = { } ) Reactor.global.run_in_thread if !Reactor.global.running? [:client_max_retries] = .delete(:max_retries) fresh = .delete( :fresh ) opts = OpenStruct.new opts.rpc = OpenStruct.new( ) if fresh @dispatcher_connections[url] = RPC::Client::Dispatcher.new( opts, url ) else @dispatcher_connections[url] ||= RPC::Client::Dispatcher.new( opts, url ) end end |