class

HT2::BackpressureManager

Inherits Reference < Object

Manages backpressure for HTTP/2 connections and streams

Constants

DEFAULT_HIGH_WATERMARK = 0.8
DEFAULT_LOW_WATERMARK = 0.5
DEFAULT_MAX_WRITE_BUFFER = 1024_i64 * 1024_i64

Constructors

new(high_watermark : Float64 = DEFAULT_HIGH_WATERMARK, low_watermark : Float64 = DEFAULT_LOW_WATERMARK, max_write_buffer : Int64 = DEFAULT_MAX_WRITE_BUFFER)
Source

Instance methods

complete_write(bytes : Int64, stream_id : UInt32 | Nil) : Nil
Source
connection_metrics
Source
high_watermark
Source
low_watermark
Source
max_write_buffer
Source
on_pause
Source
on_resume
Source
paused?
Source
should_pause?
Source
should_resume?
Source
stream_pressure(stream_id : UInt32) : Float64
Source
track_write(bytes : Int64, stream_id : UInt32 | Nil) : Nil
Source
wait_for_capacity(timeout : Time::Span = 100.milliseconds) : Bool
Source

Nested types