rename MaxPacketSizeIPv{4,6} to InitialPacketSizeIPv{4,6}

This commit is contained in:
Marten Seemann
2021-01-23 11:44:13 +08:00
parent 2c45f2b11d
commit eea0b1eacd
5 changed files with 12 additions and 12 deletions

View File

@@ -34,7 +34,7 @@ var _ = Describe("Header", func() {
DestConnectionID: protocol.ConnectionID{0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe},
SrcConnectionID: protocol.ConnectionID{0xde, 0xca, 0xfb, 0xad, 0x0, 0x0, 0x13, 0x37},
Version: 0x1020304,
Length: protocol.MaxPacketSizeIPv4,
Length: protocol.InitialPacketSizeIPv4,
},
PacketNumber: 0xdecaf,
PacketNumberLen: protocol.PacketNumberLen3,
@@ -47,8 +47,8 @@ var _ = Describe("Header", func() {
0x8, // src connection ID length
0xde, 0xca, 0xfb, 0xad, 0x0, 0x0, 0x13, 0x37, // source connection ID
}
expected = append(expected, encodeVarInt(protocol.MaxPacketSizeIPv4)...) // length
expected = append(expected, []byte{0xd, 0xec, 0xaf}...) // packet number
expected = append(expected, encodeVarInt(protocol.InitialPacketSizeIPv4)...) // length
expected = append(expected, []byte{0xd, 0xec, 0xaf}...) // packet number
Expect(buf.Bytes()).To(Equal(expected))
})