class Avro::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/avro/ipc.rb
538 def initialize(host, port)
539   @host, @port = host, port
540   @remote_name = "#{host}:#{port}"
541   @conn = Net::HTTP.start host, port
542 end

Public Instance Methods

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