handle WINDOW_UPDATEs for streams and connection separately

In IETF QUIC, stream 0 is a valid stream ID, and is not used to encode
WINDOW_UPDATEs for the connection any more.
This commit is contained in:
Marten Seemann
2017-10-16 18:21:01 +07:00
parent c53a83535e
commit e087ee7e9f
6 changed files with 62 additions and 42 deletions

View File

@@ -24,5 +24,6 @@ type FlowControlManager interface {
AddBytesSent(streamID protocol.StreamID, n protocol.ByteCount) error
SendWindowSize(streamID protocol.StreamID) (protocol.ByteCount, error)
RemainingConnectionWindowSize() protocol.ByteCount
UpdateWindow(streamID protocol.StreamID, offset protocol.ByteCount) (bool, error)
UpdateStreamWindow(streamID protocol.StreamID, offset protocol.ByteCount) (bool, error)
UpdateConnectionWindow(offset protocol.ByteCount) bool
}