forked from quic-go/quic-go
protocol: rename VersionNumber to Version (#4295)
This commit is contained in:
@@ -101,8 +101,8 @@ func (e *HandshakeTimeoutError) Is(target error) bool { return target == net.Err
|
||||
|
||||
// A VersionNegotiationError occurs when the client and the server can't agree on a QUIC version.
|
||||
type VersionNegotiationError struct {
|
||||
Ours []protocol.VersionNumber
|
||||
Theirs []protocol.VersionNumber
|
||||
Ours []protocol.Version
|
||||
Theirs []protocol.Version
|
||||
}
|
||||
|
||||
func (e *VersionNegotiationError) Error() string {
|
||||
|
||||
@@ -108,8 +108,8 @@ var _ = Describe("QUIC Errors", func() {
|
||||
Context("Version Negotiation errors", func() {
|
||||
It("has a string representation", func() {
|
||||
Expect((&VersionNegotiationError{
|
||||
Ours: []protocol.VersionNumber{2, 3},
|
||||
Theirs: []protocol.VersionNumber{4, 5, 6},
|
||||
Ours: []protocol.Version{2, 3},
|
||||
Theirs: []protocol.Version{4, 5, 6},
|
||||
}).Error()).To(Equal("no compatible QUIC version found (we support [0x2 0x3], server offered [0x4 0x5 0x6])"))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user