mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
Merge branch 'quic-go:master' into uquic
This commit is contained in:
commit
a9a033da78
14 changed files with 216 additions and 5 deletions
|
@ -491,6 +491,18 @@ func (p *TransportParameters) ValidFor0RTT(saved *TransportParameters) bool {
|
|||
p.ActiveConnectionIDLimit == saved.ActiveConnectionIDLimit
|
||||
}
|
||||
|
||||
// ValidForUpdate checks that the new transport parameters don't reduce limits after resuming a 0-RTT connection.
|
||||
// It is only used on the client side.
|
||||
func (p *TransportParameters) ValidForUpdate(saved *TransportParameters) bool {
|
||||
return p.ActiveConnectionIDLimit >= saved.ActiveConnectionIDLimit &&
|
||||
p.InitialMaxData >= saved.InitialMaxData &&
|
||||
p.InitialMaxStreamDataBidiLocal >= saved.InitialMaxStreamDataBidiLocal &&
|
||||
p.InitialMaxStreamDataBidiRemote >= saved.InitialMaxStreamDataBidiRemote &&
|
||||
p.InitialMaxStreamDataUni >= saved.InitialMaxStreamDataUni &&
|
||||
p.MaxBidiStreamNum >= saved.MaxBidiStreamNum &&
|
||||
p.MaxUniStreamNum >= saved.MaxUniStreamNum
|
||||
}
|
||||
|
||||
// String returns a string representation, intended for logging.
|
||||
func (p *TransportParameters) String() string {
|
||||
logString := "&wire.TransportParameters{OriginalDestinationConnectionID: %s, InitialSourceConnectionID: %s, "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue