Class: Baykit::BayServer::Docker::Http::H2::H2PacketUnPacker::FrameHeaderItem

Inherits:
Object
  • Object
show all
Defined in:
lib/baykit/bayserver/docker/http/h2/h2_packet_unpacker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(start, len) ⇒ FrameHeaderItem

Returns a new instance of FrameHeaderItem.



23
24
25
26
27
# File 'lib/baykit/bayserver/docker/http/h2/h2_packet_unpacker.rb', line 23

def initialize(start, len)
  @start = start
  @len = len
  @pos = 0
end

Instance Attribute Details

#lenObject (readonly)

Returns the value of attribute len.



20
21
22
# File 'lib/baykit/bayserver/docker/http/h2/h2_packet_unpacker.rb', line 20

def len
  @len
end

#posObject

Returns the value of attribute pos.



21
22
23
# File 'lib/baykit/bayserver/docker/http/h2/h2_packet_unpacker.rb', line 21

def pos
  @pos
end

#startObject (readonly)

Returns the value of attribute start.



19
20
21
# File 'lib/baykit/bayserver/docker/http/h2/h2_packet_unpacker.rb', line 19

def start
  @start
end

Instance Method Details

#get(buf, index) ⇒ Object



29
30
31
# File 'lib/baykit/bayserver/docker/http/h2/h2_packet_unpacker.rb', line 29

def get(buf, index)
  return buf.buf[@start + index].codepoints[0]
end