class Tros::IPC::HTTPTransceiver

Only works for clients. Sigh.

Attributes

host[R]
port[R]
remote_name[R]

Public Class Methods

new(host, port) click to toggle source
    # File lib/tros/ipc.rb
537 def initialize(host, port)
538   @host, @port = host, port
539   @remote_name = "#{host}:#{port}"
540   @conn = Net::HTTP.start host, port
541 end

Public Instance Methods

transceive(message) click to toggle source
    # File lib/tros/ipc.rb
543 def transceive(message)
544   writer = FramedWriter.new(StringIO.new)
545   writer.write_framed_message(message)
546   resp = @conn.post('/', writer.to_s, {'Content-Type' => 'tros/binary'})
547   FramedReader.new(StringIO.new(resp.body)).read_framed_message
548 end