class Miu::RPC::Client

Public Class Methods

new(address) click to toggle source
# File lib/miu/rpc/client.rb, line 23
def initialize(address)
  @socket = DealerSocket.new
  @socket.connect address
  @evaluator = Evaluator.new @socket
end

Public Instance Methods

call(method, *args) click to toggle source
# File lib/miu/rpc/client.rb, line 33
def call(method, *args)
  @evaluator.call method, *args
rescue Exception => e
  abort e
end
close() click to toggle source
# File lib/miu/rpc/client.rb, line 29
def close
  @socket.close
end
notify(method, *args) click to toggle source
# File lib/miu/rpc/client.rb, line 39
def notify(method, *args)
  @evaluator.notify method, *args
rescue Exception => e
  abort e
end