Method: Protocol::HTTP2::Window#initialize

Defined in:
lib/protocol/http2/window_update_frame.rb

#initialize(capacity = 0xFFFF) ⇒ Window

Returns a new instance of Window.

Parameters:

  • capacity (Integer) (defaults to: 0xFFFF)

    The initial window size, typically from the settings.



27
28
29
30
31
32
33
34
# File 'lib/protocol/http2/window_update_frame.rb', line 27

def initialize(capacity = 0xFFFF)
  # This is the main field required:
  @available = capacity
  
  # These two fields are primarily used for efficiently sending window updates:
  @used = 0
  @capacity = capacity
end