pass RTTStats to the FlowControllers

ref #106
This commit is contained in:
Marten Seemann
2016-10-30 17:36:36 +07:00
parent c8b7246159
commit 32d89eee02
6 changed files with 24 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
package flowcontrol
import (
"github.com/lucas-clemente/quic-go/congestion"
"github.com/lucas-clemente/quic-go/handshake"
"github.com/lucas-clemente/quic-go/protocol"
)
@@ -9,6 +10,7 @@ type flowController struct {
streamID protocol.StreamID
connectionParametersManager *handshake.ConnectionParametersManager
rttStats *congestion.RTTStats
bytesSent protocol.ByteCount
sendFlowControlWindow protocol.ByteCount
@@ -20,10 +22,11 @@ type flowController struct {
}
// newFlowController gets a new flow controller
func newFlowController(streamID protocol.StreamID, connectionParametersManager *handshake.ConnectionParametersManager) *flowController {
func newFlowController(streamID protocol.StreamID, connectionParametersManager *handshake.ConnectionParametersManager, rttStats *congestion.RTTStats) *flowController {
fc := flowController{
streamID: streamID,
connectionParametersManager: connectionParametersManager,
rttStats: rttStats,
}
if streamID == 0 {