Parent

Methods

Arachni::RPC::RemoteObjectMapper

Maps the methods of remote objects to local ones. (Well, not really, it just passes the message along to the remote end.)

You start like:

server = Arachni::RPC::EM::Client.new( host: 'localhost', port: 7331 )
bench  = Arachni::RPC::EM::Client::Mapper.new( server, 'bench' )

And it allows you to do this:

res = bench.foo( 1, 2, 3 )

Instead of:

res = client.call( 'bench.foo', 1, 2, 3 )

The server on the other end must have an appropriate handler set, like:

class Bench
    def foo( i = 0 )
        return i
    end
end

server = Arachni::RPC::EM::Server.new( host: 'localhost', port: 7331 )
server.add_handler( 'bench', Bench.new )

@author: Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>

Public Class Methods

new( server, remote ) click to toggle source
# File lib/arachni/rpc/remote_object_mapper.rb, line 48
def initialize( server, remote )
    @server = server
    @remote = remote
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.