class Dizby::BasicClient

Public Class Methods

new(server, stream, remote_uri) click to toggle source
Calls superclass method
# File lib/dizby/stream/client.rb, line 11
def initialize(server, stream, remote_uri)
  super(server, stream)

  @remote_uri = remote_uri

  # write the other side's remote_uri to the socket
  write(dump_data(@remote_uri))
end

Public Instance Methods

recv_reply() click to toggle source
# File lib/dizby/stream/client.rb, line 26
def recv_reply
  succ, result = Array.new(2) { read }
  [succ, result]
end
send_request(ref, msg_id, *args, &block) click to toggle source
# File lib/dizby/stream/client.rb, line 20
def send_request(ref, msg_id, *args, &block)
  arr = [ref, msg_id.id2name, args.length, *args, block]
  arr.map! { |ele| dump_data(ele) }
  write(arr.join(''))
end