# File lib/thrift/transport/base_transport.rb, line 61 def close; end
# File lib/thrift/transport/base_transport.rb, line 98 def flush; end
# File lib/thrift/transport/base_transport.rb, line 59 def open; end
# File lib/thrift/transport/base_transport.rb, line 57 def open?; end
# File lib/thrift/transport/base_transport.rb, line 63 def read(sz) raise NotImplementedError end
# File lib/thrift/transport/base_transport.rb, line 84 def read_all(size) return '' if size <= 0 buf = read(size) while (buf.length < size) chunk = read(size - buf.length) buf << chunk end buf end
Returns an unsigned byte as a Fixnum in the range (0..255).
# File lib/thrift/transport/base_transport.rb, line 68 def read_byte buf = read_all(1) return ::Thrift::TransportUtils.get_string_byte(buf, 0) end
Reads size bytes and copies them into buffer.
# File lib/thrift/transport/base_transport.rb, line 74 def read_into_buffer(buffer, size) tmp = read_all(size) i = 0 tmp.each_byte do |byte| ::Thrift::TransportUtils.set_string_byte(buffer, i, byte) i += 1 end i end
# File lib/thrift/transport/base_transport.rb, line 95 def write(buf); end