Method: Thrift::FramedTransport#write

Defined in:
lib/thrift/transport/framed_transport.rb

#write(buf, sz = nil) ⇒ Object



80
81
82
83
84
85
# File 'lib/thrift/transport/framed_transport.rb', line 80

def write(buf, sz=nil)
  return @transport.write(buf) unless @write

  buf = Bytes.force_binary_encoding(buf)
  @wbuf << (sz ? buf[0...sz] : buf)
end