Module: HTTP2::FlowBuffer

Includes:
Error
Included in:
Connection, Stream
Defined in:
lib/http/2/flow_buffer.rb

Overview

Implementation of stream and connection DATA flow control: frames may be split and / or may be buffered based on current flow control window.

Constant Summary collapse

MAX_WINDOW_SIZE =
(2 << 30) - 1

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#send_bufferObject (readonly)

Returns the value of attribute send_buffer.



10
11
12
# File 'lib/http/2/flow_buffer.rb', line 10

def send_buffer
  @send_buffer
end

Instance Method Details

#buffered_amountInteger

Amount of buffered data. Only DATA payloads are subject to flow stream and connection flow control.

Returns:

  • (Integer)


18
19
20
# File 'lib/http/2/flow_buffer.rb', line 18

def buffered_amount
  @send_buffer.bytesize
end

#flushObject



22
23
24
# File 'lib/http/2/flow_buffer.rb', line 22

def flush
  send_data
end