Method: Thrift::BinaryProtocol#initialize
- Defined in:
- lib/thrift/protocol/binary_protocol.rb
#initialize(trans, strict_read = true, strict_write = true) ⇒ BinaryProtocol
Returns a new instance of BinaryProtocol.
28 29 30 31 32 33 34 35 36 |
# File 'lib/thrift/protocol/binary_protocol.rb', line 28 def initialize(trans, strict_read=true, strict_write=true) super(trans) @strict_read = strict_read @strict_write = strict_write # Pre-allocated read buffer for fixed-size read methods. Needs to be at least 8 bytes long for # read_i64() and read_double(). @rbuf = Bytes.empty_byte_buffer(8) end |