remove unused GetBytesSent function from flow controller

This commit is contained in:
Marten Seemann
2017-02-08 10:39:16 +07:00
parent 7ce7203f16
commit 1aaf049a11
3 changed files with 0 additions and 20 deletions

View File

@@ -91,17 +91,6 @@ func (f *flowControlManager) ResetStream(streamID protocol.StreamID, byteOffset
return nil
}
func (f *flowControlManager) GetBytesSent(streamID protocol.StreamID) (protocol.ByteCount, error) {
f.mutex.Lock()
defer f.mutex.Unlock()
fc, err := f.getFlowController(streamID)
if err != nil {
return 0, err
}
return fc.GetBytesSent(), nil
}
// UpdateHighestReceived updates the highest received byte offset for a stream
// it adds the number of additional bytes to connection level flow control
// streamID must not be 0 here

View File

@@ -66,10 +66,6 @@ func (c *flowController) AddBytesSent(n protocol.ByteCount) {
c.bytesSent += n
}
func (c *flowController) GetBytesSent() protocol.ByteCount {
return c.bytesSent
}
// UpdateSendWindow should be called after receiving a WindowUpdateFrame
// it returns true if the window was actually updated
func (c *flowController) UpdateSendWindow(newOffset protocol.ByteCount) bool {

View File

@@ -118,11 +118,6 @@ var _ = Describe("Flow controller", func() {
Expect(controller.bytesSent).To(Equal(protocol.ByteCount(5 + 6)))
})
It("gets the bytesSent", func() {
controller.bytesSent = 8
Expect(controller.GetBytesSent()).To(Equal(protocol.ByteCount(8)))
})
It("gets the size of the remaining flow control window", func() {
controller.bytesSent = 5
controller.sendWindow = 12