class Protocol::HTTP2::WindowUpdateFrame


-————————————————————-+
|R| Window Size Increment (31) |
-————————————————————-+
The WINDOW_UPDATE frame is used to implement flow control.

def apply(connection)

@parameter connection [Connection] The connection to apply the frame to.
Apply this WINDOW_UPDATE frame to a connection for processing.
def apply(connection)
	connection.receive_window_update(self)
end

def pack(window_size_increment)

@parameter window_size_increment [Integer] The window size increment value.
Pack a window size increment into the frame.
def pack(window_size_increment)
	super [window_size_increment].pack(FORMAT)
end

def read_payload(stream)

@raises [FrameSizeError] If the frame length is invalid.
@parameter stream [IO] The stream to read from.
Read and validate the WINDOW_UPDATE frame payload.
def read_payload(stream)
	super
	
	if @length != 4
		raise FrameSizeError, "Invalid frame length: #{@length} != 4!"
	end
end

def unpack

@returns [Integer] The window size increment value.
Unpack the window size increment from the frame payload.
def unpack
	super.unpack1(FORMAT)
end