Module: HTTP2::FlowBuffer

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.

Instance Method Summary collapse

Instance Method Details

#buffered_amountInteger

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

Returns:

  • (Integer)

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

def buffered_amount
  @send_buffer.map { |f| f[:length] }.reduce(:+) || 0
end