forked from quic-go/quic-go
fix some linter warnings
This commit is contained in:
@@ -2,9 +2,11 @@ package congestion
|
|||||||
|
|
||||||
import "github.com/lucas-clemente/quic-go/protocol"
|
import "github.com/lucas-clemente/quic-go/protocol"
|
||||||
|
|
||||||
|
// PacketInfo combines packet number and length of a packet for congestion calculation
|
||||||
type PacketInfo struct {
|
type PacketInfo struct {
|
||||||
Number protocol.PacketNumber
|
Number protocol.PacketNumber
|
||||||
Length protocol.ByteCount
|
Length protocol.ByteCount
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PacketVector is passed to the congestion algorithm
|
||||||
type PacketVector []PacketInfo
|
type PacketVector []PacketInfo
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import (
|
|||||||
"github.com/lucas-clemente/quic-go/protocol"
|
"github.com/lucas-clemente/quic-go/protocol"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// A SendAlgorithm performs congestion control and calculates the congestion window
|
||||||
type SendAlgorithm interface {
|
type SendAlgorithm interface {
|
||||||
TimeUntilSend(now time.Time, bytesInFlight protocol.ByteCount) time.Duration
|
TimeUntilSend(now time.Time, bytesInFlight protocol.ByteCount) time.Duration
|
||||||
OnPacketSent(sentTime time.Time, bytesInFlight protocol.ByteCount, packetNumber protocol.PacketNumber, bytes protocol.ByteCount, isRetransmittable bool) bool
|
OnPacketSent(sentTime time.Time, bytesInFlight protocol.ByteCount, packetNumber protocol.PacketNumber, bytes protocol.ByteCount, isRetransmittable bool) bool
|
||||||
@@ -20,6 +21,7 @@ type SendAlgorithm interface {
|
|||||||
SetSlowStartLargeReduction(enabled bool)
|
SetSlowStartLargeReduction(enabled bool)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SendAlgorithmWithDebugInfo adds some debug functions to SendAlgorithm
|
||||||
type SendAlgorithmWithDebugInfo interface {
|
type SendAlgorithmWithDebugInfo interface {
|
||||||
SendAlgorithm
|
SendAlgorithm
|
||||||
BandwidthEstimate() Bandwidth
|
BandwidthEstimate() Bandwidth
|
||||||
|
|||||||
Reference in New Issue
Block a user