Class: HTTP2::Settings

Inherits:
Struct
  • Object
show all
Defined in:
lib/http/2/settings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(settings_header_table_size: 4096, settings_enable_push: 1, settings_max_concurrent_streams: 100, settings_initial_window_size: 65_535, settings_max_frame_size: 16_384, settings_max_header_list_size: (2 << 30) - 1) ⇒ Settings

Returns a new instance of Settings.



23
24
25
26
27
28
29
30
31
32
# File 'lib/http/2/settings.rb', line 23

def initialize(
  settings_header_table_size: 4096,
  settings_enable_push: 1,
  settings_max_concurrent_streams: 100,
  settings_initial_window_size: 65_535,
  settings_max_frame_size: 16_384,
  settings_max_header_list_size: (2 << 30) - 1
)
  super
end

Instance Attribute Details

#settings_enable_pushObject

Returns the value of attribute settings_enable_push

Returns:

  • (Object)

    the current value of settings_enable_push



14
15
16
# File 'lib/http/2/settings.rb', line 14

def settings_enable_push
  @settings_enable_push
end

#settings_header_table_sizeObject

Returns the value of attribute settings_header_table_size

Returns:

  • (Object)

    the current value of settings_header_table_size



14
15
16
# File 'lib/http/2/settings.rb', line 14

def settings_header_table_size
  @settings_header_table_size
end

#settings_initial_window_sizeObject

Returns the value of attribute settings_initial_window_size

Returns:

  • (Object)

    the current value of settings_initial_window_size



14
15
16
# File 'lib/http/2/settings.rb', line 14

def settings_initial_window_size
  @settings_initial_window_size
end

#settings_max_concurrent_streamsObject

Returns the value of attribute settings_max_concurrent_streams

Returns:

  • (Object)

    the current value of settings_max_concurrent_streams



14
15
16
# File 'lib/http/2/settings.rb', line 14

def settings_max_concurrent_streams
  @settings_max_concurrent_streams
end

#settings_max_frame_sizeObject

Returns the value of attribute settings_max_frame_size

Returns:

  • (Object)

    the current value of settings_max_frame_size



14
15
16
# File 'lib/http/2/settings.rb', line 14

def settings_max_frame_size
  @settings_max_frame_size
end

#settings_max_header_list_sizeObject

Returns the value of attribute settings_max_header_list_size

Returns:

  • (Object)

    the current value of settings_max_header_list_size



14
15
16
# File 'lib/http/2/settings.rb', line 14

def settings_max_header_list_size
  @settings_max_header_list_size
end

Instance Method Details

#each_settingObject



34
35
36
37
38
39
40
# File 'lib/http/2/settings.rb', line 34

def each_setting
  each_pair do |k, v|
    next if v == SPEC_DEFAULT_CONNECTION_SETTINGS[k]

    yield k, v
  end
end