rename the wire.InvariantHeader to Header

This commit is contained in:
Marten Seemann 2018-11-20 17:17:43 +07:00
parent bf96707f48
commit 7b91ba56b6
8 changed files with 178 additions and 178 deletions

View file

@ -326,11 +326,11 @@ var _ = Describe("Header", func() {
srcConnID := protocol.ConnectionID{0xde, 0xca, 0xfb, 0xad, 0x013, 0x37, 0x13, 0x37}
data, err := ComposeVersionNegotiation(destConnID, srcConnID, []protocol.VersionNumber{0x12345678, 0x87654321})
Expect(err).ToNot(HaveOccurred())
iHdr, err := ParseInvariantHeader(bytes.NewReader(data), 4)
hdr, err := ParseHeader(bytes.NewReader(data), 4)
Expect(err).ToNot(HaveOccurred())
hdr, err := iHdr.Parse(bytes.NewReader(data), versionIETFHeader)
extHdr, err := hdr.Parse(bytes.NewReader(data), versionIETFHeader)
Expect(err).ToNot(HaveOccurred())
hdr.Log(logger)
extHdr.Log(logger)
Expect(buf.String()).To(ContainSubstring("VersionNegotiationPacket{DestConnectionID: 0xdeadbeefcafe1337, SrcConnectionID: 0xdecafbad13371337"))
Expect(buf.String()).To(ContainSubstring("0x12345678"))
Expect(buf.String()).To(ContainSubstring("0x87654321"))