forked from quic-go/quic-go
implement rules for frame types in 0-RTT packets
This commit is contained in:
@@ -106,11 +106,21 @@ func (p *frameParser) isAllowedAtEncLevel(f Frame, encLevel protocol.EncryptionL
|
||||
switch f.(type) {
|
||||
case *CryptoFrame, *AckFrame, *ConnectionCloseFrame, *PingFrame:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
case protocol.Encryption0RTT:
|
||||
switch f.(type) {
|
||||
case *CryptoFrame, *AckFrame, *ConnectionCloseFrame, *NewTokenFrame, *PathResponseFrame, *RetireConnectionIDFrame:
|
||||
return false
|
||||
default:
|
||||
return true
|
||||
}
|
||||
case protocol.Encryption1RTT:
|
||||
return true
|
||||
default:
|
||||
panic("unknown encryption level")
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (p *frameParser) SetAckDelayExponent(exp uint8) {
|
||||
|
||||
Reference in New Issue
Block a user