updateWindow adjusts the inbound quota for the stream. Window updates will be sent out when the cumulative quota exceeds the corresponding threshold.
(s *ClientStream, n uint32)
| 1158 | // Window updates will be sent out when the cumulative quota |
| 1159 | // exceeds the corresponding threshold. |
| 1160 | func (t *http2Client) updateWindow(s *ClientStream, n uint32) { |
| 1161 | if w := s.fc.onRead(n); w > 0 { |
| 1162 | t.controlBuf.put(&outgoingWindowUpdate{streamID: s.id, increment: w}) |
| 1163 | } |
| 1164 | } |
| 1165 | |
| 1166 | // updateFlowControl updates the incoming flow control windows |
| 1167 | // for the transport and the stream based on the current bdp |