From d78b2f4d57610dfef23e71c0c90b5ec25b1dda3d Mon Sep 17 00:00:00 2001 From: Lucas Clemente Date: Sun, 15 May 2016 14:46:10 +0200 Subject: [PATCH] fix some linter warnings --- congestion/congestion_vector.go | 2 ++ congestion/interface.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/congestion/congestion_vector.go b/congestion/congestion_vector.go index fa649b60..9c6ebb4e 100644 --- a/congestion/congestion_vector.go +++ b/congestion/congestion_vector.go @@ -2,9 +2,11 @@ package congestion import "github.com/lucas-clemente/quic-go/protocol" +// PacketInfo combines packet number and length of a packet for congestion calculation type PacketInfo struct { Number protocol.PacketNumber Length protocol.ByteCount } +// PacketVector is passed to the congestion algorithm type PacketVector []PacketInfo diff --git a/congestion/interface.go b/congestion/interface.go index 6c6ee68e..d98b6978 100644 --- a/congestion/interface.go +++ b/congestion/interface.go @@ -6,6 +6,7 @@ import ( "github.com/lucas-clemente/quic-go/protocol" ) +// A SendAlgorithm performs congestion control and calculates the congestion window type SendAlgorithm interface { 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 @@ -20,6 +21,7 @@ type SendAlgorithm interface { SetSlowStartLargeReduction(enabled bool) } +// SendAlgorithmWithDebugInfo adds some debug functions to SendAlgorithm type SendAlgorithmWithDebugInfo interface { SendAlgorithm BandwidthEstimate() Bandwidth