forked from quic-go/quic-go
implement qlogging of the congestion_state_updated event
This commit is contained in:
@@ -308,3 +308,20 @@ func (r timeoutReason) String() string {
|
||||
panic("unknown close reason")
|
||||
}
|
||||
}
|
||||
|
||||
type congestionState logging.CongestionState
|
||||
|
||||
func (s congestionState) String() string {
|
||||
switch logging.CongestionState(s) {
|
||||
case logging.CongestionStateSlowStart:
|
||||
return "slow_start"
|
||||
case logging.CongestionStateCongestionAvoidance:
|
||||
return "congestion_avoidance"
|
||||
case logging.CongestionStateRecovery:
|
||||
return "recovery"
|
||||
case logging.CongestionStateApplicationLimited:
|
||||
return "application_limited"
|
||||
default:
|
||||
panic("unknown congestion state")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user