Skip to main content

CONNECTION_RECEIVE_WINDOW

Constant CONNECTION_RECEIVE_WINDOW 

Source
pub const CONNECTION_RECEIVE_WINDOW: VarInt;
Expand description

Aggregate flow-control window for one connection, in bytes.

The bound on what an unauthenticated peer can make this process hold. quinn’s own default is VarInt::MAX — no aggregate limit at all — and with this server’s raised stream limit that is 1024 x the 2 MiB STREAM_RECEIVE_WINDOW, so a single connection could pin 2 GiB of receive buffer before we ever see a request to authenticate: open the streams, fill each window, stop. On a 1 GB VPS one connection is enough to end the process.

The cap only constrains data that has arrived and not yet been read, and both tunnel pumps read continuously, so it binds exactly when the target is slower than the client — which is the case that should be bounded.

16 MiB against the 2 MiB per-stream window: eight simultaneously saturated tunnels still get their full stream windows, while the worst case stops being a function of max_streams_bidi.