Class: Baykit::BayServer::Docker::Http::H2::Command::CmdPriority
- Inherits:
-
H2Command
- Object
- Protocol::Command
- H2Command
- Baykit::BayServer::Docker::Http::H2::Command::CmdPriority
- Includes:
- Baykit::BayServer::Docker::Http::H2
- Defined in:
- lib/baykit/bayserver/docker/http/h2/command/cmd_priority.rb
Instance Attribute Summary collapse
-
#excluded ⇒ Object
readonly
Returns the value of attribute excluded.
-
#stream_dependency ⇒ Object
readonly
Returns the value of attribute stream_dependency.
-
#weight ⇒ Object
readonly
Returns the value of attribute weight.
Attributes inherited from H2Command
Instance Method Summary collapse
- #handle(cmd_handler) ⇒ Object
-
#initialize(stream_id, flags = nil) ⇒ CmdPriority
constructor
A new instance of CmdPriority.
- #pack(pkt) ⇒ Object
- #unpack(pkt) ⇒ Object
Constructor Details
#initialize(stream_id, flags = nil) ⇒ CmdPriority
Returns a new instance of CmdPriority.
27 28 29 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_priority.rb', line 27 def initialize(stream_id, flags=nil) super(H2Type::PRIORITY, stream_id, flags) end |
Instance Attribute Details
#excluded ⇒ Object (readonly)
Returns the value of attribute excluded.
24 25 26 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_priority.rb', line 24 def excluded @excluded end |
#stream_dependency ⇒ Object (readonly)
Returns the value of attribute stream_dependency.
25 26 27 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_priority.rb', line 25 def stream_dependency @stream_dependency end |
#weight ⇒ Object (readonly)
Returns the value of attribute weight.
23 24 25 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_priority.rb', line 23 def weight @weight end |
Instance Method Details
#handle(cmd_handler) ⇒ Object
48 49 50 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_priority.rb', line 48 def handle(cmd_handler) return cmd_handler.handle_priority(self) end |
#pack(pkt) ⇒ Object
41 42 43 44 45 46 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_priority.rb', line 41 def pack(pkt) acc = pkt.new_data_accessor() acc.put_int(H2Packet.make_stream_dependency32(@excluded, @stream_dependency)) acc.put_byte(@weight) super end |
#unpack(pkt) ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_priority.rb', line 31 def unpack(pkt) super acc = pkt.new_data_accessor() val = acc.get_int @excluded = H2Packet.extract_flag(val) == 1 @stream_dependency = H2Packet.extract_int31(val) @weight = acc.get_byte end |