=begin This file is part of the Arachni-RPC project and may be subject to redistribution and commercial restrictions. Please see the Arachni-RPC web site for more information on licensing and terms of use. =end module Toq # Maps the methods of remote objects to local ones. # # You start like: # # client = Toq::Client.new( host: 'localhost', port: 7331 ) # bench = Toq::Proxy.new( client, 'bench' ) # # And it allows you to do this: # # result = bench.foo( 1, 2, 3 ) # # Instead of: # # result = 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 = Toq::Server.new( host: 'localhost', port: 7331 ) # server.add_handler( 'bench', Bench.new ) # # @author Tasos "Zapotek" Laskos class Proxy class <