aboutsummaryrefslogtreecommitdiffstats
path: root/lib/plum/frame/continuation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plum/frame/continuation.rb')
-rw-r--r--lib/plum/frame/continuation.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/plum/frame/continuation.rb b/lib/plum/frame/continuation.rb
new file mode 100644
index 0000000..1c5232c
--- /dev/null
+++ b/lib/plum/frame/continuation.rb
@@ -0,0 +1,16 @@
+# frozen-string-literal: true
+
+using Plum::BinaryString
+module Plum
+ class Frame::Continuation < Frame
+ register_subclass 0x09
+
+ # Creates a CONTINUATION frame.
+ # @param stream_id [Integer] The stream ID.
+ # @param payload [String] Payload.
+ # @param end_headers [Boolean] add END_HEADERS flag
+ def initialize(stream_id, payload, end_headers: false)
+ initialize_base(type: :continuation, stream_id: stream_id, flags_value: (end_headers ? 4 : 0), payload: payload)
+ end
+ end
+end