class Protocol::HTTP2::LocalWindow

This is a window which efficiently maintains a desired capacity.

def initialize(capacity = 0xFFFF, desired: nil)

def initialize(capacity = 0xFFFF, desired: nil)
	super(capacity)
	
	@desired = desired
end

def limited?

def limited?
	if @desired
		@available < @desired
	else
		super
	end
end

def wanted

def wanted
	if @desired
		# We must send an update which allows at least @desired bytes to be sent.
		(@desired - @capacity) + @used
	else
		@used
	end
end