chore: support set cwnd for hy2 too
This commit is contained in:
@ -13,7 +13,9 @@ const (
|
||||
)
|
||||
|
||||
func SetCongestionController(quicConn quic.Connection, cc string, cwnd int) {
|
||||
CWND := c.ByteCount(cwnd)
|
||||
if cwnd == 0 {
|
||||
cwnd = 32
|
||||
}
|
||||
switch cc {
|
||||
case "cubic":
|
||||
quicConn.SetCongestionControl(
|
||||
@ -38,7 +40,7 @@ func SetCongestionController(quicConn quic.Connection, cc string, cwnd int) {
|
||||
congestion.NewBBRSender(
|
||||
congestion.DefaultClock{},
|
||||
congestion.GetInitialPacketSize(quicConn.RemoteAddr()),
|
||||
CWND*congestion.InitialMaxDatagramSize,
|
||||
c.ByteCount(cwnd)*congestion.InitialMaxDatagramSize,
|
||||
congestion.DefaultBBRMaxCongestionWindow*congestion.InitialMaxDatagramSize,
|
||||
),
|
||||
)
|
||||
|
Reference in New Issue
Block a user