Class: Arachni::RPC::Server::Base

Inherits:
Arachni::RPC::Server show all
Defined in:
lib/arachni/rpc/server/base.rb

Overview

RPC server class

Instance Method Summary collapse

Constructor Details

#initialize(options, token = nil) ⇒ Base



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/arachni/rpc/server/base.rb', line 34

def initialize( options, token = nil )
    if options.is_a?( Hash )
        original_options = options
        options     = OpenStruct.new
        options.rpc = OpenStruct.new( original_options )
    end

    super(
        serializer: Serializer,
        host:       options.rpc.server_address,
        port:       options.rpc.server_port,
        socket:     options.rpc.server_socket,
        token:      token,
        ssl_ca:     options.rpc.ssl_ca,
        ssl_pkey:   options.rpc.server_ssl_private_key,
        ssl_cert:   options.rpc.server_ssl_certificate
    )
end

Instance Method Details

#ready?Boolean



58
59
60
# File 'lib/arachni/rpc/server/base.rb', line 58

def ready?
    @ready ||= false
end

#startObject



53
54
55
56
# File 'lib/arachni/rpc/server/base.rb', line 53

def start
    super
    @ready = true
end