implement the recent changes to the version negotiation packet

This commit is contained in:
Marten Seemann
2017-12-05 07:31:12 +07:00
parent 5d900346fd
commit 45e43ada40
13 changed files with 87 additions and 100 deletions

View File

@@ -28,8 +28,6 @@ const (
type PacketType uint8
const (
// PacketTypeVersionNegotiation is the packet type of a Version Negotiation packet
PacketTypeVersionNegotiation PacketType = 1
// PacketTypeInitial is the packet type of a Initial packet
PacketTypeInitial PacketType = 2
// PacketTypeRetry is the packet type of a Retry packet
@@ -42,8 +40,6 @@ const (
func (t PacketType) String() string {
switch t {
case PacketTypeVersionNegotiation:
return "Version Negotiation"
case PacketTypeInitial:
return "Initial"
case PacketTypeRetry:

View File

@@ -8,7 +8,6 @@ import (
var _ = Describe("Protocol", func() {
Context("Long Header Packet Types", func() {
It("has the correct string representation", func() {
Expect(PacketTypeVersionNegotiation.String()).To(Equal("Version Negotiation"))
Expect(PacketTypeInitial.String()).To(Equal("Initial"))
Expect(PacketTypeRetry.String()).To(Equal("Retry"))
Expect(PacketTypeHandshake.String()).To(Equal("Handshake"))