mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
allow 0-RTT resumption if the server's stream limit was increased
This commit is contained in:
parent
3bce408c8d
commit
3588cddd43
4 changed files with 83 additions and 22 deletions
|
@ -440,14 +440,14 @@ func (p *TransportParameters) UnmarshalFromSessionTicket(r *bytes.Reader) error
|
|||
}
|
||||
|
||||
// ValidFor0RTT checks if the transport parameters match those saved in the session ticket.
|
||||
func (p *TransportParameters) ValidFor0RTT(tp *TransportParameters) bool {
|
||||
return p.InitialMaxStreamDataBidiLocal == tp.InitialMaxStreamDataBidiLocal &&
|
||||
p.InitialMaxStreamDataBidiRemote == tp.InitialMaxStreamDataBidiRemote &&
|
||||
p.InitialMaxStreamDataUni == tp.InitialMaxStreamDataUni &&
|
||||
p.InitialMaxData == tp.InitialMaxData &&
|
||||
p.MaxBidiStreamNum == tp.MaxBidiStreamNum &&
|
||||
p.MaxUniStreamNum == tp.MaxUniStreamNum &&
|
||||
p.ActiveConnectionIDLimit == tp.ActiveConnectionIDLimit
|
||||
func (p *TransportParameters) ValidFor0RTT(saved *TransportParameters) bool {
|
||||
return p.InitialMaxStreamDataBidiLocal == saved.InitialMaxStreamDataBidiLocal &&
|
||||
p.InitialMaxStreamDataBidiRemote == saved.InitialMaxStreamDataBidiRemote &&
|
||||
p.InitialMaxStreamDataUni == saved.InitialMaxStreamDataUni &&
|
||||
p.InitialMaxData == saved.InitialMaxData &&
|
||||
p.MaxBidiStreamNum >= saved.MaxBidiStreamNum &&
|
||||
p.MaxUniStreamNum >= saved.MaxUniStreamNum &&
|
||||
p.ActiveConnectionIDLimit == saved.ActiveConnectionIDLimit
|
||||
}
|
||||
|
||||
// String returns a string representation, intended for logging.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue