diff --git a/internal/ackhandler/cc_adapter.go b/internal/ackhandler/cc_adapter.go index fa0cebf6ccd..659ab83495a 100644 --- a/internal/ackhandler/cc_adapter.go +++ b/internal/ackhandler/cc_adapter.go @@ -8,7 +8,10 @@ import ( "github.com/quic-go/quic-go/internal/protocol" ) -var _ cgInternal.SendAlgorithmEx = &ccAdapter{} +var ( + _ cgInternal.SendAlgorithmEx = &ccAdapter{} + _ cgInternal.SendAlgorithmWithDebugInfos = &ccAdapter{} +) type ccAdapter struct { CC congestion.CongestionControl diff --git a/internal/congestion/interface.go b/internal/congestion/interface.go index da052159e66..54fcbbea35b 100644 --- a/internal/congestion/interface.go +++ b/internal/congestion/interface.go @@ -20,6 +20,11 @@ type SendAlgorithm interface { SetMaxDatagramSize(protocol.ByteCount) } +type SendAlgorithmEx interface { + SendAlgorithm + OnCongestionEventEx(priorInFlight protocol.ByteCount, eventTime time.Time, ackedPackets []congestion.AckedPacketInfo, lostPackets []congestion.LostPacketInfo) +} + // A SendAlgorithmWithDebugInfos is a SendAlgorithm that exposes some debug infos type SendAlgorithmWithDebugInfos interface { SendAlgorithm @@ -27,8 +32,3 @@ type SendAlgorithmWithDebugInfos interface { InRecovery() bool GetCongestionWindow() protocol.ByteCount } - -type SendAlgorithmEx interface { - SendAlgorithmWithDebugInfos - OnCongestionEventEx(priorInFlight protocol.ByteCount, eventTime time.Time, ackedPackets []congestion.AckedPacketInfo, lostPackets []congestion.LostPacketInfo) -}