forked from quic-go/quic-go
implement basic FlowControlManager
This commit is contained in:
@@ -15,3 +15,12 @@ type FlowController interface {
|
||||
CheckFlowControlViolation() bool
|
||||
GetHighestReceived() protocol.ByteCount
|
||||
}
|
||||
|
||||
// A FlowControlManager manages the flow control
|
||||
type FlowControlManager interface {
|
||||
NewStream(streamID protocol.StreamID, contributesToConnectionFlow bool)
|
||||
UpdateHighestReceived(streamID protocol.StreamID, byteOffset protocol.ByteCount) error
|
||||
AddBytesRead(streamID protocol.StreamID, n protocol.ByteCount) error
|
||||
MaybeTriggerStreamWindowUpdate(streamID protocol.StreamID) (bool, protocol.ByteCount, error)
|
||||
MaybeTriggerConnectionWindowUpdate() (bool, protocol.ByteCount)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user