MCPcopy Create free account
hub / github.com/imroc/req / WriteWindowUpdate

Method WriteWindowUpdate

internal/http2/frame.go:1040–1048  ·  view source on GitHub ↗

WriteWindowUpdate writes a WINDOW_UPDATE frame. The increment value must be between 1 and 2,147,483,647, inclusive. If the Stream ID is zero, the window update applies to the connection as a whole.

(streamID, incr uint32)

Source from the content-addressed store, hash-verified

1038// If the Stream ID is zero, the window update applies to the
1039// connection as a whole.
1040func (h2f *Framer) WriteWindowUpdate(streamID, incr uint32) error {
1041 // "The legal range for the increment to the flow control window is 1 to 2^31-1 (2,147,483,647) octets."
1042 if (incr < 1 || incr > 2147483647) && !h2f.AllowIllegalWrites {
1043 return errors.New("illegal window increment value")
1044 }
1045 h2f.startWrite(FrameWindowUpdate, 0, streamID)
1046 h2f.writeUint32(incr)
1047 return h2f.endWrite()
1048}
1049
1050// A HeadersFrame is used to open a stream and additionally carries a
1051// header block fragment.

Callers 5

newClientConnMethod · 0.80
ReadMethod · 0.80
CloseMethod · 0.80
processDataMethod · 0.80

Calls 3

startWriteMethod · 0.95
writeUint32Method · 0.95
endWriteMethod · 0.95

Tested by 1