diff --git a/internal/congestion/cubic_sender.go b/internal/congestion/cubic_sender.go index 6f3d3289a..76706753e 100644 --- a/internal/congestion/cubic_sender.go +++ b/internal/congestion/cubic_sender.go @@ -66,7 +66,7 @@ var _ SendAlgorithm = &cubicSender{} var _ SendAlgorithmWithDebugInfo = &cubicSender{} // NewCubicSender makes a new cubic sender -func NewCubicSender(clock Clock, rttStats *RTTStats, reno bool, initialCongestionWindow, initialMaxCongestionWindow protocol.ByteCount) SendAlgorithmWithDebugInfo { +func NewCubicSender(clock Clock, rttStats *RTTStats, reno bool, initialCongestionWindow, initialMaxCongestionWindow protocol.ByteCount) *cubicSender { return &cubicSender{ rttStats: rttStats, initialCongestionWindow: initialCongestionWindow, diff --git a/internal/congestion/cubic_sender_test.go b/internal/congestion/cubic_sender_test.go index de3b74fcc..1f1357dfd 100644 --- a/internal/congestion/cubic_sender_test.go +++ b/internal/congestion/cubic_sender_test.go @@ -26,7 +26,7 @@ const MaxCongestionWindow protocol.ByteCount = 200 * protocol.DefaultTCPMSS var _ = Describe("Cubic Sender", func() { var ( - sender SendAlgorithmWithDebugInfo + sender *cubicSender clock mockClock bytesInFlight protocol.ByteCount packetNumber protocol.PacketNumber diff --git a/internal/congestion/interface.go b/internal/congestion/interface.go index 7c27da64a..51e2e28dc 100644 --- a/internal/congestion/interface.go +++ b/internal/congestion/interface.go @@ -14,12 +14,7 @@ type SendAlgorithm interface { MaybeExitSlowStart() OnPacketAcked(number protocol.PacketNumber, ackedBytes protocol.ByteCount, priorInFlight protocol.ByteCount, eventTime time.Time) OnPacketLost(number protocol.PacketNumber, lostBytes protocol.ByteCount, priorInFlight protocol.ByteCount) - SetNumEmulatedConnections(n int) OnRetransmissionTimeout(packetsRetransmitted bool) - OnConnectionMigration() - - // Experiments - SetSlowStartLargeReduction(enabled bool) } // SendAlgorithmWithDebugInfo adds some debug functions to SendAlgorithm diff --git a/internal/mocks/congestion.go b/internal/mocks/congestion.go index 774930eab..b98665931 100644 --- a/internal/mocks/congestion.go +++ b/internal/mocks/congestion.go @@ -61,18 +61,6 @@ func (mr *MockSendAlgorithmMockRecorder) MaybeExitSlowStart() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaybeExitSlowStart", reflect.TypeOf((*MockSendAlgorithm)(nil).MaybeExitSlowStart)) } -// OnConnectionMigration mocks base method -func (m *MockSendAlgorithm) OnConnectionMigration() { - m.ctrl.T.Helper() - m.ctrl.Call(m, "OnConnectionMigration") -} - -// OnConnectionMigration indicates an expected call of OnConnectionMigration -func (mr *MockSendAlgorithmMockRecorder) OnConnectionMigration() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnConnectionMigration", reflect.TypeOf((*MockSendAlgorithm)(nil).OnConnectionMigration)) -} - // OnPacketAcked mocks base method func (m *MockSendAlgorithm) OnPacketAcked(arg0 protocol.PacketNumber, arg1, arg2 protocol.ByteCount, arg3 time.Time) { m.ctrl.T.Helper() @@ -121,30 +109,6 @@ func (mr *MockSendAlgorithmMockRecorder) OnRetransmissionTimeout(arg0 interface{ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnRetransmissionTimeout", reflect.TypeOf((*MockSendAlgorithm)(nil).OnRetransmissionTimeout), arg0) } -// SetNumEmulatedConnections mocks base method -func (m *MockSendAlgorithm) SetNumEmulatedConnections(arg0 int) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "SetNumEmulatedConnections", arg0) -} - -// SetNumEmulatedConnections indicates an expected call of SetNumEmulatedConnections -func (mr *MockSendAlgorithmMockRecorder) SetNumEmulatedConnections(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetNumEmulatedConnections", reflect.TypeOf((*MockSendAlgorithm)(nil).SetNumEmulatedConnections), arg0) -} - -// SetSlowStartLargeReduction mocks base method -func (m *MockSendAlgorithm) SetSlowStartLargeReduction(arg0 bool) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "SetSlowStartLargeReduction", arg0) -} - -// SetSlowStartLargeReduction indicates an expected call of SetSlowStartLargeReduction -func (mr *MockSendAlgorithmMockRecorder) SetSlowStartLargeReduction(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSlowStartLargeReduction", reflect.TypeOf((*MockSendAlgorithm)(nil).SetSlowStartLargeReduction), arg0) -} - // TimeUntilSend mocks base method func (m *MockSendAlgorithm) TimeUntilSend(arg0 protocol.ByteCount) time.Duration { m.ctrl.T.Helper()