class Thrift::IOStreamTransport
Public Class Methods
new(input, output)
click to toggle source
# File lib/thrift/transport/io_stream_transport.rb, line 28 def initialize(input, output) @input = input @output = output end
Public Instance Methods
close()
click to toggle source
# File lib/thrift/transport/io_stream_transport.rb, line 36 def close; @input.close; @output.close end
open?()
click to toggle source
# File lib/thrift/transport/io_stream_transport.rb, line 33 def open?; not @input.closed? or not @output.closed? end
read(sz)
click to toggle source
# File lib/thrift/transport/io_stream_transport.rb, line 34 def read(sz); @input.read(sz) end
to_io()
click to toggle source
# File lib/thrift/transport/io_stream_transport.rb, line 37 def to_io; @input end
write(buf)
click to toggle source
# File lib/thrift/transport/io_stream_transport.rb, line 35 def write(buf); @output.write(Bytes.force_binary_encoding(buf)) end