Class: Baykit::BayServer::Docker::Http::H2::Command::CmdContinuation
- Inherits:
-
H2Command
- Object
- Protocol::Command
- H2Command
- Baykit::BayServer::Docker::Http::H2::Command::CmdContinuation
- Includes:
- Baykit::BayServer::Docker::Http::H2
- Defined in:
- lib/baykit/bayserver/docker/http/h2/command/cmd_continuation.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#start ⇒ Object
readonly
This class refers external byte array, so this IS NOT mutable.
Attributes inherited from H2Command
Instance Method Summary collapse
- #handle(cmd_handler) ⇒ Object
-
#initialize(stream_id, flags = nil) ⇒ CmdContinuation
constructor
A new instance of CmdContinuation.
- #pack(pkt) ⇒ Object
- #unpack(pkt) ⇒ Object
Constructor Details
#initialize(stream_id, flags = nil) ⇒ CmdContinuation
Returns a new instance of CmdContinuation.
27 28 29 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_continuation.rb', line 27 def initialize(stream_id, flags = nil) super(H2Type::CONTINUATION, stream_id, flags) end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
25 26 27 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_continuation.rb', line 25 def data @data end |
#length ⇒ Object (readonly)
Returns the value of attribute length.
24 25 26 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_continuation.rb', line 24 def length @length end |
#start ⇒ Object (readonly)
This class refers external byte array, so this IS NOT mutable
23 24 25 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_continuation.rb', line 23 def start @start end |
Instance Method Details
#handle(cmd_handler) ⇒ Object
47 48 49 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_continuation.rb', line 47 def handle(cmd_handler) return cmd_handler.handle_continuation(self) end |
#pack(pkt) ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_continuation.rb', line 38 def pack(pkt) acc = pkt.new_data_accessor() if @flags.padded? raise RuntimeError.new("Padding not supported") end acc.put_bytes(@data, @start, @length) super end |
#unpack(pkt) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/baykit/bayserver/docker/http/h2/command/cmd_continuation.rb', line 31 def unpack(pkt) super @data = pkt.buf @start = pkt.header_len @length = pkt.data_len() end |