diff options
Diffstat (limited to 'lib/plum/frame/window_update.rb')
-rw-r--r-- | lib/plum/frame/window_update.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/plum/frame/window_update.rb b/lib/plum/frame/window_update.rb new file mode 100644 index 0000000..3fe5ecd --- /dev/null +++ b/lib/plum/frame/window_update.rb @@ -0,0 +1,16 @@ +# frozen-string-literal: true + +using Plum::BinaryString +module Plum + class Frame::WindowUpdate < Frame + register_subclass 0x08 + + # Creates a WINDOW_UPDATE frame. + # @param stream_id [Integer] the stream ID or 0. + # @param wsi [Integer] the amount to increase + def initialize(stream_id, wsi) + payload = "".b.push_uint32(wsi) + initialize_base(type: :window_update, stream_id: stream_id, payload: payload) + end + end +end |