initialSendWindowBytes property

int? initialSendWindowBytes
final

What a sender may put in flight BEFORE the peer's first grant arrives, or null to stay unbounded until then.

Credit only exists once a grant has been received, so until then a sender is limited by nothing at all. The gap is a LATENCY gap, so it is invisible on a zero-latency in-memory pair and wide on a real link. Measured on a 20ms one-way link, a client-stream upload of 40000 x 4KiB into a handler that never reads:

without: 156.25 MiB pulled -- everything, before any grant arrived
with   :   4.05 MiB

So both windows above applied only once grants were already flowing, and a burst that fits in one round trip was never throttled. This is the same role HTTP/2's 65535-byte default initial window plays, and the default here is the same order for the same reason: large enough that a small call never waits, small enough that a flood cannot outrun the first grant.

Grants CLAMP to flowControlWindowBytes rather than adding to it, so seeding credit here cannot let a stream exceed its configured window.

A peer that never grants -- one predating flow control -- would stall once this is spent; initialSendWindowGrace is what keeps that from being a deadlock.

Implementation

final int? initialSendWindowBytes;