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
542 def initialize(host, port)
543   @host, @port = host, port
544   @remote_name = "#{host}:#{port}"
545   @conn = Net::HTTP.start host, port
546 end

Public Instance Methods

transceive(message) click to toggle source
    # File lib/avro/ipc.rb
548 def transceive(message)
549   writer = FramedWriter.new(StringIO.new(String.new('', encoding: 'BINARY')))
550   writer.write_framed_message(message)
551   resp = @conn.post('/', writer.to_s, {'Content-Type' => 'avro/binary'})
552   FramedReader.new(StringIO.new(resp.body)).read_framed_message
553 end