Class: Baykit::BayServer::Docker::Http::H2::HeaderBlockParser
- Inherits:
-
Object
- Object
- Baykit::BayServer::Docker::Http::H2::HeaderBlockParser
- Includes:
- Huffman, Util
- Defined in:
- lib/baykit/bayserver/docker/http/h2/header_block_parser.rb
Instance Attribute Summary collapse
-
#buf ⇒ Object
readonly
Returns the value of attribute buf.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
Instance Method Summary collapse
-
#initialize(buf, start, length) ⇒ HeaderBlockParser
constructor
A new instance of HeaderBlockParser.
- #parse_header_blocks ⇒ Object
Constructor Details
#initialize(buf, start, length) ⇒ HeaderBlockParser
21 22 23 24 25 26 |
# File 'lib/baykit/bayserver/docker/http/h2/header_block_parser.rb', line 21 def initialize(buf, start, length) @buf = buf @start = start @pos = 0 @length = length end |
Instance Attribute Details
#buf ⇒ Object (readonly)
Returns the value of attribute buf.
15 16 17 |
# File 'lib/baykit/bayserver/docker/http/h2/header_block_parser.rb', line 15 def buf @buf end |
#length ⇒ Object (readonly)
Returns the value of attribute length.
18 19 20 |
# File 'lib/baykit/bayserver/docker/http/h2/header_block_parser.rb', line 18 def length @length end |
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
17 18 19 |
# File 'lib/baykit/bayserver/docker/http/h2/header_block_parser.rb', line 17 def pos @pos end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
16 17 18 |
# File 'lib/baykit/bayserver/docker/http/h2/header_block_parser.rb', line 16 def start @start end |
Instance Method Details
#parse_header_blocks ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/baykit/bayserver/docker/http/h2/header_block_parser.rb', line 28 def parse_header_blocks header_blocks = [] while @pos < @length blk = parse_header_block() BayLog.trace("h2: header block read: %s", blk) header_blocks << blk end return header_blocks end |