Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodtHttp2ClientConn.ReleaseBody

procedure ReleaseBody(aStreamID: Cardinal; aBytes: Integer);
THE BACKPRESSURE VALVE, and the deliberate inversion of what the server engine does. tHttp2Conn credits the receive window the instant DATA arrives and refuses bodies that grow too large, because a server assembles a request body before dispatching it and real backpressure would deadlock an upload. A client is the other way round: the consumer is known, the common case is a large download to a stream the caller supplied, and credit is issued only once the consumer says it has taken the bytes. Until then the window closes and the peer stops - which is what backpressure IS. Call it with the byte count handed to you by OnResponseData once that data is safely consumed. Credit below cH2CliCreditThreshold is accumulated.