initialize(builder, address, loop = Loop.new)
initialize(host, port, loop = Loop.new)
Creates a client.
# File lib/msgpack/rpc/client.rb, line 29 29: def initialize(arg1, arg2, arg3=nil) 30: if arg1.respond_to?(:build_transport) 31: # 1. 32: builder = arg1 33: address = arg2 34: loop = arg3 || Loop.new 35: else 36: # 2. 37: builder = TCPTransport.new 38: address = Address.new(arg1, arg2) 39: loop = arg3 || Loop.new 40: end 41: 42: super(builder, address, loop) 43: 44: @timer = Timer.new(1, true, &method(:step_timeout)) 45: loop.attach(@timer) 46: end
open(builder, address, loop = Loop.new) {|client }
open(host, port, loop = Loop.new) {|client }
Creates a client, calls the block and closes the client.
# File lib/msgpack/rpc/client.rb, line 54 54: def self.open(*args, &block) 55: c = new(*args) 56: begin 57: block.call(c) 58: ensure 59: c.close 60: end 61: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.