pass MAX_STREAM_DATA frames directly to the stream

This commit is contained in:
Marten Seemann
2017-12-12 09:49:36 +07:00
parent 823098d6e2
commit 2d31440510
6 changed files with 38 additions and 30 deletions

View File

@@ -24,7 +24,7 @@ type streamI interface {
Cancel(error)
// methods needed for flow control
GetWindowUpdate() protocol.ByteCount
UpdateSendWindow(protocol.ByteCount)
HandleMaxStreamDataFrame(*wire.MaxStreamDataFrame)
IsFlowControlBlocked() bool
}
@@ -481,8 +481,8 @@ func (s *stream) StreamID() protocol.StreamID {
return s.streamID
}
func (s *stream) UpdateSendWindow(n protocol.ByteCount) {
s.flowController.UpdateSendWindow(n)
func (s *stream) HandleMaxStreamDataFrame(frame *wire.MaxStreamDataFrame) {
s.flowController.UpdateSendWindow(frame.ByteOffset)
}
func (s *stream) IsFlowControlBlocked() bool {