forked from quic-go/quic-go
add tracing for sent and received packets
This commit is contained in:
@@ -39,6 +39,9 @@ type SentPacketHandler interface {
|
||||
|
||||
GetAlarmTimeout() time.Time
|
||||
OnAlarm() error
|
||||
|
||||
// report some congestion statistics. For tracing only.
|
||||
GetStats() *State
|
||||
}
|
||||
|
||||
// ReceivedPacketHandler handles ACKs needed to send for incoming packets
|
||||
@@ -50,3 +53,12 @@ type ReceivedPacketHandler interface {
|
||||
GetAlarmTimeout() time.Time
|
||||
GetAckFrame(protocol.EncryptionLevel) *wire.AckFrame
|
||||
}
|
||||
|
||||
type State struct {
|
||||
MinRTT time.Duration
|
||||
SmoothedRTT time.Duration
|
||||
LatestRTT time.Duration
|
||||
|
||||
BytesInFlight protocol.ByteCount
|
||||
CongestionWindow protocol.ByteCount
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user