error cosmetics

This commit is contained in:
Lucas Clemente
2016-05-17 00:12:04 +02:00
parent dd13836aa9
commit fec9786939
3 changed files with 8 additions and 8 deletions

View File

@@ -4,9 +4,9 @@ import "github.com/lucas-clemente/quic-go/protocol"
// The error codes defined by QUIC // The error codes defined by QUIC
const ( const (
InternalError = protocol.ErrorCode(1) InternalError protocol.ErrorCode = 1
InvalidFrameData = protocol.ErrorCode(4) InvalidFrameData protocol.ErrorCode = 4
DecryptionFailure = protocol.ErrorCode(12) DecryptionFailure protocol.ErrorCode = 12
PeerGoingAway = protocol.ErrorCode(16) PeerGoingAway protocol.ErrorCode = 16
NetworkIdleTimeout = protocol.ErrorCode(25) NetworkIdleTimeout protocol.ErrorCode = 25
) )

View File

@@ -30,9 +30,6 @@ type StreamID uint32
// A ByteCount in QUIC // A ByteCount in QUIC
type ByteCount uint64 type ByteCount uint64
// An ErrorCode in QUIC
type ErrorCode uint32
// MaxPacketSize is the maximum packet size, including the public header // MaxPacketSize is the maximum packet size, including the public header
const MaxPacketSize ByteCount = 1452 const MaxPacketSize ByteCount = 1452

View File

@@ -1,5 +1,8 @@
package protocol package protocol
// An ErrorCode in QUIC
type ErrorCode uint32
// A QuicError is a QUIC error // A QuicError is a QUIC error
type QuicError struct { type QuicError struct {
ErrorCode ErrorCode ErrorCode ErrorCode