Class: Thrift::FramedTransport

Inherits:
BaseTransport
  • Object
show all
Defined in:
lib/hypertable/thrift_transport_monkey_patch.rb

Instance Method Summary collapse

Constructor Details

#initialize(transport, read = true, write = true) ⇒ FramedTransport

Returns a new instance of FramedTransport.



11
12
13
14
15
16
# File 'lib/hypertable/thrift_transport_monkey_patch.rb', line 11

def initialize(transport, read=true, write=true)
  reset_state
  @transport = transport
  @read = read
  @write = write
end

Instance Method Details

#openObject



24
25
26
27
# File 'lib/hypertable/thrift_transport_monkey_patch.rb', line 24

def open
  reset_state
  @transport.open
end

#reset_stateObject



18
19
20
21
22
# File 'lib/hypertable/thrift_transport_monkey_patch.rb', line 18

def reset_state
  @rbuf = ''
  @wbuf = ''
  @index = 0
end