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)
| 1038 | // If the Stream ID is zero, the window update applies to the |
| 1039 | // connection as a whole. |
| 1040 | func (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. |