forked from quic-go/quic-go
add methods for sending data to FlowControlManager
This commit is contained in:
committed by
Lucas Clemente
parent
9336245ddd
commit
ac54ac66c7
@@ -73,6 +73,7 @@ func (c *flowController) UpdateSendWindow(newOffset protocol.ByteCount) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// TODO: remove once the Stream doesn't use it anymore
|
||||
func (c *flowController) SendWindowSize() protocol.ByteCount {
|
||||
c.mutex.RLock()
|
||||
defer c.mutex.RUnlock()
|
||||
@@ -85,6 +86,13 @@ func (c *flowController) SendWindowSize() protocol.ByteCount {
|
||||
return sendFlowControlWindow - c.bytesSent
|
||||
}
|
||||
|
||||
func (c *flowController) SendWindowOffset() protocol.ByteCount {
|
||||
c.mutex.RLock()
|
||||
defer c.mutex.RUnlock()
|
||||
|
||||
return c.getSendFlowControlWindow()
|
||||
}
|
||||
|
||||
// UpdateHighestReceived updates the highestReceived value, if the byteOffset is higher
|
||||
// Should **only** be used for the stream-level FlowController
|
||||
func (c *flowController) UpdateHighestReceived(byteOffset protocol.ByteCount) protocol.ByteCount {
|
||||
|
||||
Reference in New Issue
Block a user