determine the packet type from the QUIC header

This commit is contained in:
Marten Seemann
2020-01-21 12:24:15 +07:00
parent e6d55ac467
commit bfd745106c
4 changed files with 184 additions and 67 deletions

View File

@@ -12,4 +12,13 @@ var _ = Describe("Types", func() {
Expect(categoryRecovery.String()).To(Equal("recovery"))
Expect(categorySecurity.String()).To(Equal("security"))
})
It("has a string representation for the packet type", func() {
Expect(packetTypeInitial.String()).To(Equal("initial"))
Expect(packetTypeHandshake.String()).To(Equal("handshake"))
Expect(packetType0RTT.String()).To(Equal("0RTT"))
Expect(packetType1RTT.String()).To(Equal("1RTT"))
Expect(packetTypeRetry.String()).To(Equal("retry"))
Expect(packetTypeVersionNegotiation.String()).To(Equal("version_negotiation"))
})
})