module Protocol::HTTP2::FlowControlled

def available_frame_size(maximum_frame_size = self.maximum_frame_size)

This could be negative if the window has been overused due to a change in initial window size.
def available_frame_size(maximum_frame_size = self.maximum_frame_size)
	available_size = self.available_size
	
	# puts "available_size=#{available_size} maximum_frame_size=#{maximum_frame_size}"
	
	if available_size < maximum_frame_size
		return available_size
	else
		return maximum_frame_size
	end
end