Class: Baykit::BayServer::Docker::Http::H2::H2Command
- Inherits:
-
Protocol::Command
- Object
- Protocol::Command
- Baykit::BayServer::Docker::Http::H2::H2Command
- Defined in:
- lib/baykit/bayserver/docker/http/h2/h2_command.rb
Direct Known Subclasses
Command::CmdData, Command::CmdGoAway, Command::CmdHeaders, Command::CmdPing, Command::CmdPreface, Command::CmdPriority, Command::CmdRstStream, Command::CmdSettings, Command::CmdWindowUpdate
Instance Attribute Summary collapse
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#stream_id ⇒ Object
Returns the value of attribute stream_id.
Instance Method Summary collapse
-
#initialize(type, stream_id, flags = nil) ⇒ H2Command
constructor
A new instance of H2Command.
- #pack(pkt) ⇒ Object
- #unpack(pkt) ⇒ Object
Constructor Details
#initialize(type, stream_id, flags = nil) ⇒ H2Command
Returns a new instance of H2Command.
15 16 17 18 19 20 21 22 23 |
# File 'lib/baykit/bayserver/docker/http/h2/h2_command.rb', line 15 def initialize(type, stream_id, flags=nil) super type @stream_id = stream_id if flags == nil @flags = H2Flags.new else @flags = flags end end |
Instance Attribute Details
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
12 13 14 |
# File 'lib/baykit/bayserver/docker/http/h2/h2_command.rb', line 12 def flags @flags end |
#stream_id ⇒ Object
Returns the value of attribute stream_id.
13 14 15 |
# File 'lib/baykit/bayserver/docker/http/h2/h2_command.rb', line 13 def stream_id @stream_id end |
Instance Method Details
#pack(pkt) ⇒ Object
30 31 32 33 34 |
# File 'lib/baykit/bayserver/docker/http/h2/h2_command.rb', line 30 def pack(pkt) pkt.stream_id = @stream_id pkt.flags = @flags pkt.pack_header end |
#unpack(pkt) ⇒ Object
25 26 27 28 |
# File 'lib/baykit/bayserver/docker/http/h2/h2_command.rb', line 25 def unpack(pkt) @stream_id = pkt.stream_id @flags = pkt.flags end |