http-2 1.2.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/sig/settings.rbs ADDED
@@ -0,0 +1,73 @@
1
+ module HTTP2
2
+ MAX_HEADER_LIST_SIZE: Integer
3
+
4
+ MAX_HEADER_TABLE_SIZE: Integer
5
+
6
+ SPEC_DEFAULT_CONNECTION_SETTINGS: Hash[Symbol, Integer]
7
+
8
+ ENCODING_CONTEXT_SETTINGS: Array[Symbol]
9
+
10
+ type huffman_type = :always | :never | :shorter
11
+
12
+ type index_type = :all | :static | :never
13
+
14
+ # Container for all settings required for the management of an HTTP/2 connection. This
15
+ # includes the managemenet of the settings negotiated via the SETTINGS frame, as well as
16
+ # user-level configuration related with header compression.
17
+ class Settings # this is actually a Struct, but RBS does not support it yet
18
+ # connection settings (send and received in the SETTINGS frame)
19
+
20
+ # maximum size of the header compression table used to decode header blocks, in bytes.
21
+ attr_reader settings_header_table_size: Integer
22
+
23
+ # can be used to disable server push (set to 0)
24
+ attr_reader settings_enable_push: Integer
25
+
26
+ # maximum number of concurrent streams that the sender will allow.
27
+ attr_reader settings_max_concurrent_streams: Integer
28
+
29
+ # initial window size (in bytes) for stream-level flow control.
30
+ attr_reader settings_initial_window_size: Integer
31
+
32
+ # max size of for payload that the sender is willing to receive, in bytes.
33
+ attr_reader settings_max_frame_size: Integer
34
+ attr_reader settings_max_header_list_size: Integer
35
+
36
+ # encoding context settings
37
+
38
+ # controls how to use huffman encoding to encode strings. can be one of the following values:
39
+ #
40
+ # * `:always` - Always use Huffman encoding
41
+ # * `:never` - Do not use Huffman encoding
42
+ # * `:shorter` - Use Huffman when the result is strictly shorter
43
+ attr_reader huffman: huffman_type
44
+
45
+ # controls the configuration of the HPACK indexing tables:
46
+ #
47
+ # * `:static` - use the static table only
48
+ # * `:all` - use the static table and the dynamic table
49
+ # * `:never` - do not use any of the tables.
50
+ attr_reader index: index_type
51
+
52
+ # maximum dynamic table size in bytes
53
+ attr_reader table_size: Integer
54
+
55
+ def initialize: (
56
+ # connection settings
57
+ ?settings_header_table_size: Integer,
58
+ ?settings_enable_push: Integer,
59
+ ?settings_max_concurrent_streams: Integer,
60
+ ?settings_initial_window_size: Integer,
61
+ ?settings_max_frame_size: Integer,
62
+ ?settings_max_header_list_size: Integer,
63
+ # encoding context settings
64
+ ?huffman: huffman_type,
65
+ ?index: index_type,
66
+ ?table_size: Integer
67
+ ) -> void
68
+
69
+ # yields connection-level settings only.
70
+ def connection_settings: () { (Symbol, Integer) -> void } -> self
71
+ | () -> Enumerable[[Symbol, Integer]]
72
+ end
73
+ end
data/sig/stream.rbs CHANGED
@@ -3,6 +3,8 @@ module HTTP2
3
3
  include FlowBuffer
4
4
  include Emitter
5
5
 
6
+ DEFAULT_WEIGHT: Integer
7
+
6
8
  STREAM_OPEN_STATES: Array[Symbol]
7
9
 
8
10
  attr_reader id: Integer
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http-2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Cardoso
@@ -19,6 +19,7 @@ executables: []
19
19
  extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
+ - LICENSE
22
23
  - README.md
23
24
  - lib/http/2.rb
24
25
  - lib/http/2/base64.rb
@@ -54,6 +55,7 @@ files:
54
55
  - sig/header/encoding_context.rbs
55
56
  - sig/header/huffman.rbs
56
57
  - sig/server.rbs
58
+ - sig/settings.rbs
57
59
  - sig/stream.rbs
58
60
  homepage: https://github.com/igrigorik/http-2
59
61
  licenses: