diff --git a/ackhandler/interfaces.go b/ackhandler/interfaces.go index 8c2e79e8..c7a9c56d 100644 --- a/ackhandler/interfaces.go +++ b/ackhandler/interfaces.go @@ -3,8 +3,8 @@ package ackhandler import ( "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" ) // SentPacketHandler handles ACKs received for outgoing packets diff --git a/ackhandler/packet.go b/ackhandler/packet.go index 901071eb..9c4ee30b 100644 --- a/ackhandler/packet.go +++ b/ackhandler/packet.go @@ -3,8 +3,8 @@ package ackhandler import ( "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" ) // A Packet is a packet diff --git a/ackhandler/received_packet_handler.go b/ackhandler/received_packet_handler.go index 84a47669..214835cd 100644 --- a/ackhandler/received_packet_handler.go +++ b/ackhandler/received_packet_handler.go @@ -4,8 +4,8 @@ import ( "errors" "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" ) var errInvalidPacketNumber = errors.New("ReceivedPacketHandler: Invalid packet number") diff --git a/ackhandler/received_packet_handler_test.go b/ackhandler/received_packet_handler_test.go index 2552825a..7e2a1f1a 100644 --- a/ackhandler/received_packet_handler_test.go +++ b/ackhandler/received_packet_handler_test.go @@ -3,8 +3,8 @@ package ackhandler import ( "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/ackhandler/received_packet_history.go b/ackhandler/received_packet_history.go index a3488b21..d8e0880b 100644 --- a/ackhandler/received_packet_history.go +++ b/ackhandler/received_packet_history.go @@ -1,9 +1,9 @@ package ackhandler import ( + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/ackhandler/received_packet_history_test.go b/ackhandler/received_packet_history_test.go index 6778a056..df3f33a3 100644 --- a/ackhandler/received_packet_history_test.go +++ b/ackhandler/received_packet_history_test.go @@ -1,9 +1,9 @@ package ackhandler import ( + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/ackhandler/sent_packet_handler.go b/ackhandler/sent_packet_handler.go index f732eab6..5d407653 100644 --- a/ackhandler/sent_packet_handler.go +++ b/ackhandler/sent_packet_handler.go @@ -6,9 +6,9 @@ import ( "time" "github.com/lucas-clemente/quic-go/congestion" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/ackhandler/sent_packet_handler_test.go b/ackhandler/sent_packet_handler_test.go index ec0de7bb..15339584 100644 --- a/ackhandler/sent_packet_handler_test.go +++ b/ackhandler/sent_packet_handler_test.go @@ -4,8 +4,8 @@ import ( "time" "github.com/lucas-clemente/quic-go/congestion" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/ackhandler/stop_waiting_manager.go b/ackhandler/stop_waiting_manager.go index c6efbb1e..04cb61f9 100644 --- a/ackhandler/stop_waiting_manager.go +++ b/ackhandler/stop_waiting_manager.go @@ -1,8 +1,8 @@ package ackhandler import ( + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" ) // This stopWaitingManager is not supposed to satisfy the StopWaitingManager interface, which is a remnant of the legacy AckHandler, and should be remove once we drop support for QUIC 33 diff --git a/benchmark/benchmark_test.go b/benchmark/benchmark_test.go index de2de42f..0d4f15f0 100644 --- a/benchmark/benchmark_test.go +++ b/benchmark/benchmark_test.go @@ -9,8 +9,8 @@ import ( "net" quic "github.com/lucas-clemente/quic-go" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/testdata" - "github.com/lucas-clemente/quic-go/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/buffer_pool.go b/buffer_pool.go index f592d475..5032ca7f 100644 --- a/buffer_pool.go +++ b/buffer_pool.go @@ -3,7 +3,7 @@ package quic import ( "sync" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) var bufferPool sync.Pool diff --git a/buffer_pool_test.go b/buffer_pool_test.go index 888dc576..49e37a68 100644 --- a/buffer_pool_test.go +++ b/buffer_pool_test.go @@ -1,7 +1,7 @@ package quic import ( - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/client.go b/client.go index 9fb2b825..9b7b7ff0 100644 --- a/client.go +++ b/client.go @@ -10,9 +10,9 @@ import ( "sync" "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/client_test.go b/client_test.go index 9c99a62a..05ec1fdc 100644 --- a/client_test.go +++ b/client_test.go @@ -7,8 +7,8 @@ import ( "net" "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" diff --git a/congestion/bandwidth.go b/congestion/bandwidth.go index e76ea161..54269c56 100644 --- a/congestion/bandwidth.go +++ b/congestion/bandwidth.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) // Bandwidth of a connection diff --git a/congestion/cubic.go b/congestion/cubic.go index 62e73556..3922f476 100644 --- a/congestion/cubic.go +++ b/congestion/cubic.go @@ -4,8 +4,8 @@ import ( "math" "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) // This cubic implementation is based on the one found in Chromiums's QUIC diff --git a/congestion/cubic_sender.go b/congestion/cubic_sender.go index 02e4206b..f2c8c2d6 100644 --- a/congestion/cubic_sender.go +++ b/congestion/cubic_sender.go @@ -3,8 +3,8 @@ package congestion import ( "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) const ( diff --git a/congestion/cubic_sender_test.go b/congestion/cubic_sender_test.go index 8afd426e..2353c42f 100644 --- a/congestion/cubic_sender_test.go +++ b/congestion/cubic_sender_test.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/congestion/cubic_test.go b/congestion/cubic_test.go index 3f12c8b9..713e919c 100644 --- a/congestion/cubic_test.go +++ b/congestion/cubic_test.go @@ -4,7 +4,7 @@ import ( "math" "time" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/congestion/hybrid_slow_start.go b/congestion/hybrid_slow_start.go index 01a64f82..f41c1e5c 100644 --- a/congestion/hybrid_slow_start.go +++ b/congestion/hybrid_slow_start.go @@ -3,8 +3,8 @@ package congestion import ( "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) // Note(pwestin): the magic clamping numbers come from the original code in diff --git a/congestion/hybrid_slow_start_test.go b/congestion/hybrid_slow_start_test.go index 43379f5c..967c0dbc 100644 --- a/congestion/hybrid_slow_start_test.go +++ b/congestion/hybrid_slow_start_test.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/congestion/interface.go b/congestion/interface.go index bbce0a63..411a5f2f 100644 --- a/congestion/interface.go +++ b/congestion/interface.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) // A SendAlgorithm performs congestion control and calculates the congestion window diff --git a/congestion/prr_sender.go b/congestion/prr_sender.go index b8a0a10b..18a3736a 100644 --- a/congestion/prr_sender.go +++ b/congestion/prr_sender.go @@ -3,8 +3,8 @@ package congestion import ( "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) // PrrSender implements the Proportional Rate Reduction (PRR) per RFC 6937 diff --git a/congestion/prr_sender_test.go b/congestion/prr_sender_test.go index 207ddf6c..e6b4f728 100644 --- a/congestion/prr_sender_test.go +++ b/congestion/prr_sender_test.go @@ -4,8 +4,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) var _ = Describe("PRR sender", func() { diff --git a/congestion/stats.go b/congestion/stats.go index 8f272b26..ed669c14 100644 --- a/congestion/stats.go +++ b/congestion/stats.go @@ -1,6 +1,6 @@ package congestion -import "github.com/lucas-clemente/quic-go/protocol" +import "github.com/lucas-clemente/quic-go/internal/protocol" type connectionStats struct { slowstartPacketsLost protocol.PacketNumber diff --git a/crypto/AEAD.go b/crypto/AEAD.go index a59ce6e8..9c8a73c1 100644 --- a/crypto/AEAD.go +++ b/crypto/AEAD.go @@ -1,6 +1,6 @@ package crypto -import "github.com/lucas-clemente/quic-go/protocol" +import "github.com/lucas-clemente/quic-go/internal/protocol" // An AEAD implements QUIC's authenticated encryption and associated data type AEAD interface { diff --git a/crypto/aesgcm_aead.go b/crypto/aesgcm_aead.go index a738cc2b..baaed5c8 100644 --- a/crypto/aesgcm_aead.go +++ b/crypto/aesgcm_aead.go @@ -6,7 +6,7 @@ import ( "github.com/lucas-clemente/aes12" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) type aeadAESGCM struct { diff --git a/crypto/cert_cache.go b/crypto/cert_cache.go index 3ebdc1ae..d8e8d8f3 100644 --- a/crypto/cert_cache.go +++ b/crypto/cert_cache.go @@ -5,7 +5,7 @@ import ( "hash/fnv" "github.com/hashicorp/golang-lru" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) var ( diff --git a/crypto/chacha20poly1305_aead.go b/crypto/chacha20poly1305_aead.go index 5c58c4e3..3e9c1dee 100644 --- a/crypto/chacha20poly1305_aead.go +++ b/crypto/chacha20poly1305_aead.go @@ -8,7 +8,7 @@ import ( "github.com/aead/chacha20" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) type aeadChacha20Poly1305 struct { diff --git a/crypto/key_derivation.go b/crypto/key_derivation.go index 8670da0e..86b68e30 100644 --- a/crypto/key_derivation.go +++ b/crypto/key_derivation.go @@ -5,8 +5,8 @@ import ( "crypto/sha256" "io" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "golang.org/x/crypto/hkdf" ) diff --git a/crypto/key_derivation_test.go b/crypto/key_derivation_test.go index 9c02c987..f929e73f 100644 --- a/crypto/key_derivation_test.go +++ b/crypto/key_derivation_test.go @@ -1,7 +1,7 @@ package crypto import ( - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/crypto/nonce.go b/crypto/nonce.go index 9b6d4164..f862f461 100644 --- a/crypto/nonce.go +++ b/crypto/nonce.go @@ -3,7 +3,7 @@ package crypto import ( "encoding/binary" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) func makeNonce(iv []byte, packetNumber protocol.PacketNumber) []byte { diff --git a/crypto/null_aead.go b/crypto/null_aead.go index ed856633..d33c90fb 100644 --- a/crypto/null_aead.go +++ b/crypto/null_aead.go @@ -5,7 +5,7 @@ import ( "errors" "github.com/lucas-clemente/fnv128a" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) // nullAEAD handles not-yet encrypted packets diff --git a/crypto/null_aead_test.go b/crypto/null_aead_test.go index 144715a6..b327b299 100644 --- a/crypto/null_aead_test.go +++ b/crypto/null_aead_test.go @@ -1,7 +1,7 @@ package crypto import ( - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/flowcontrol/flow_control_manager.go b/flowcontrol/flow_control_manager.go index 9362d60a..f11c75cf 100644 --- a/flowcontrol/flow_control_manager.go +++ b/flowcontrol/flow_control_manager.go @@ -7,8 +7,8 @@ import ( "github.com/lucas-clemente/quic-go/congestion" "github.com/lucas-clemente/quic-go/handshake" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/flowcontrol/flow_control_manager_test.go b/flowcontrol/flow_control_manager_test.go index 4911167f..e8cfa583 100644 --- a/flowcontrol/flow_control_manager_test.go +++ b/flowcontrol/flow_control_manager_test.go @@ -5,7 +5,7 @@ import ( "github.com/lucas-clemente/quic-go/congestion" "github.com/lucas-clemente/quic-go/internal/mocks" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/flowcontrol/flow_controller.go b/flowcontrol/flow_controller.go index 387ee05b..e940f79a 100644 --- a/flowcontrol/flow_controller.go +++ b/flowcontrol/flow_controller.go @@ -6,8 +6,8 @@ import ( "github.com/lucas-clemente/quic-go/congestion" "github.com/lucas-clemente/quic-go/handshake" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) type flowController struct { diff --git a/flowcontrol/flow_controller_test.go b/flowcontrol/flow_controller_test.go index b364ad1b..3d324ae9 100644 --- a/flowcontrol/flow_controller_test.go +++ b/flowcontrol/flow_controller_test.go @@ -5,7 +5,7 @@ import ( "github.com/lucas-clemente/quic-go/congestion" "github.com/lucas-clemente/quic-go/internal/mocks" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/flowcontrol/interface.go b/flowcontrol/interface.go index e1ea3fac..1b29bd78 100644 --- a/flowcontrol/interface.go +++ b/flowcontrol/interface.go @@ -1,6 +1,6 @@ package flowcontrol -import "github.com/lucas-clemente/quic-go/protocol" +import "github.com/lucas-clemente/quic-go/internal/protocol" // WindowUpdate provides the data for WindowUpdateFrames. type WindowUpdate struct { diff --git a/h2quic/client.go b/h2quic/client.go index 866b11ab..bdc70a03 100644 --- a/h2quic/client.go +++ b/h2quic/client.go @@ -15,8 +15,8 @@ import ( "golang.org/x/net/idna" quic "github.com/lucas-clemente/quic-go" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/h2quic/client_test.go b/h2quic/client_test.go index 5be4b2f4..aa61f36b 100644 --- a/h2quic/client_test.go +++ b/h2quic/client_test.go @@ -12,7 +12,7 @@ import ( "golang.org/x/net/http2/hpack" quic "github.com/lucas-clemente/quic-go" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/qerr" "time" diff --git a/h2quic/request_writer.go b/h2quic/request_writer.go index dad591cc..3f323691 100644 --- a/h2quic/request_writer.go +++ b/h2quic/request_writer.go @@ -13,8 +13,8 @@ import ( "golang.org/x/net/lex/httplex" quic "github.com/lucas-clemente/quic-go" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) type requestWriter struct { diff --git a/h2quic/response_writer.go b/h2quic/response_writer.go index 24689346..e3eeb3b0 100644 --- a/h2quic/response_writer.go +++ b/h2quic/response_writer.go @@ -8,8 +8,8 @@ import ( "sync" quic "github.com/lucas-clemente/quic-go" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "golang.org/x/net/http2" "golang.org/x/net/http2/hpack" ) diff --git a/h2quic/response_writer_test.go b/h2quic/response_writer_test.go index 735dbd03..e8de1a4f 100644 --- a/h2quic/response_writer_test.go +++ b/h2quic/response_writer_test.go @@ -11,7 +11,7 @@ import ( "golang.org/x/net/http2" "golang.org/x/net/http2/hpack" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/h2quic/server.go b/h2quic/server.go index 3647dc68..9a68ab59 100644 --- a/h2quic/server.go +++ b/h2quic/server.go @@ -13,8 +13,8 @@ import ( "time" quic "github.com/lucas-clemente/quic-go" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" "golang.org/x/net/http2" "golang.org/x/net/http2/hpack" diff --git a/h2quic/server_test.go b/h2quic/server_test.go index 171b50c2..b576dbba 100644 --- a/h2quic/server_test.go +++ b/h2quic/server_test.go @@ -18,8 +18,8 @@ import ( "golang.org/x/net/http2/hpack" quic "github.com/lucas-clemente/quic-go" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/testdata" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" diff --git a/handshake/connection_parameters_manager.go b/handshake/connection_parameters_manager.go index 81dadc74..a69f10bc 100644 --- a/handshake/connection_parameters_manager.go +++ b/handshake/connection_parameters_manager.go @@ -5,8 +5,8 @@ import ( "sync" "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/handshake/connection_parameters_manager_test.go b/handshake/connection_parameters_manager_test.go index d290262e..3bb6143b 100644 --- a/handshake/connection_parameters_manager_test.go +++ b/handshake/connection_parameters_manager_test.go @@ -5,7 +5,7 @@ import ( "math" "time" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/handshake/crypto_setup_client.go b/handshake/crypto_setup_client.go index a93db976..f26750d3 100644 --- a/handshake/crypto_setup_client.go +++ b/handshake/crypto_setup_client.go @@ -12,8 +12,8 @@ import ( "time" "github.com/lucas-clemente/quic-go/crypto" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/handshake/crypto_setup_client_test.go b/handshake/crypto_setup_client_test.go index c689a8c4..3f12d348 100644 --- a/handshake/crypto_setup_client_test.go +++ b/handshake/crypto_setup_client_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/lucas-clemente/quic-go/crypto" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/handshake/crypto_setup_server.go b/handshake/crypto_setup_server.go index 96170d0a..e10abdb3 100644 --- a/handshake/crypto_setup_server.go +++ b/handshake/crypto_setup_server.go @@ -10,8 +10,8 @@ import ( "sync" "github.com/lucas-clemente/quic-go/crypto" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/handshake/crypto_setup_server_test.go b/handshake/crypto_setup_server_test.go index b73d5e03..6cbfdbaf 100644 --- a/handshake/crypto_setup_server_test.go +++ b/handshake/crypto_setup_server_test.go @@ -7,8 +7,8 @@ import ( "net" "github.com/lucas-clemente/quic-go/crypto" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" diff --git a/handshake/ephermal_cache.go b/handshake/ephermal_cache.go index da6724f3..a996c3ed 100644 --- a/handshake/ephermal_cache.go +++ b/handshake/ephermal_cache.go @@ -5,8 +5,8 @@ import ( "time" "github.com/lucas-clemente/quic-go/crypto" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) var ( diff --git a/handshake/ephermal_cache_test.go b/handshake/ephermal_cache_test.go index bb77b29b..63ed90f9 100644 --- a/handshake/ephermal_cache_test.go +++ b/handshake/ephermal_cache_test.go @@ -4,7 +4,7 @@ import ( "time" "github.com/lucas-clemente/quic-go/crypto" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/handshake/handshake_message.go b/handshake/handshake_message.go index 1ae7ab67..c09db26a 100644 --- a/handshake/handshake_message.go +++ b/handshake/handshake_message.go @@ -7,8 +7,8 @@ import ( "io" "sort" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/handshake/interface.go b/handshake/interface.go index 751aae1e..3448c553 100644 --- a/handshake/interface.go +++ b/handshake/interface.go @@ -1,6 +1,6 @@ package handshake -import "github.com/lucas-clemente/quic-go/protocol" +import "github.com/lucas-clemente/quic-go/internal/protocol" // Sealer seals a packet type Sealer func(dst, src []byte, packetNumber protocol.PacketNumber, associatedData []byte) []byte diff --git a/integrationtests/chrome/chrome_suite_test.go b/integrationtests/chrome/chrome_suite_test.go index 17f9aa42..c3d13a10 100644 --- a/integrationtests/chrome/chrome_suite_test.go +++ b/integrationtests/chrome/chrome_suite_test.go @@ -15,8 +15,8 @@ import ( "time" "github.com/lucas-clemente/quic-go/integrationtests/tools/testserver" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" _ "github.com/lucas-clemente/quic-go/integrationtests/tools/testlog" diff --git a/integrationtests/chrome/chrome_test.go b/integrationtests/chrome/chrome_test.go index b2eecbdb..728f7fdc 100644 --- a/integrationtests/chrome/chrome_test.go +++ b/integrationtests/chrome/chrome_test.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" ) diff --git a/integrationtests/gquic/drop_test.go b/integrationtests/gquic/drop_test.go index 6ee43de3..a72d0b5d 100644 --- a/integrationtests/gquic/drop_test.go +++ b/integrationtests/gquic/drop_test.go @@ -9,7 +9,7 @@ import ( _ "github.com/lucas-clemente/quic-clients" // download clients "github.com/lucas-clemente/quic-go/integrationtests/tools/proxy" "github.com/lucas-clemente/quic-go/integrationtests/tools/testserver" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/integrationtests/gquic/integration_test.go b/integrationtests/gquic/integration_test.go index 2d12af4b..5de42558 100644 --- a/integrationtests/gquic/integration_test.go +++ b/integrationtests/gquic/integration_test.go @@ -8,7 +8,7 @@ import ( "sync" "github.com/lucas-clemente/quic-go/integrationtests/tools/testserver" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" _ "github.com/lucas-clemente/quic-clients" // download clients diff --git a/integrationtests/gquic/random_rtt_test.go b/integrationtests/gquic/random_rtt_test.go index 2a525d57..052917d6 100644 --- a/integrationtests/gquic/random_rtt_test.go +++ b/integrationtests/gquic/random_rtt_test.go @@ -11,7 +11,7 @@ import ( _ "github.com/lucas-clemente/quic-clients" // download clients "github.com/lucas-clemente/quic-go/integrationtests/tools/proxy" "github.com/lucas-clemente/quic-go/integrationtests/tools/testserver" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/integrationtests/gquic/rtt_test.go b/integrationtests/gquic/rtt_test.go index 1cce41ad..29e6a1b2 100644 --- a/integrationtests/gquic/rtt_test.go +++ b/integrationtests/gquic/rtt_test.go @@ -10,7 +10,7 @@ import ( _ "github.com/lucas-clemente/quic-clients" // download clients "github.com/lucas-clemente/quic-go/integrationtests/tools/proxy" "github.com/lucas-clemente/quic-go/integrationtests/tools/testserver" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/integrationtests/self/client_test.go b/integrationtests/self/client_test.go index 11bd6584..8e878e0c 100644 --- a/integrationtests/self/client_test.go +++ b/integrationtests/self/client_test.go @@ -11,7 +11,7 @@ import ( "github.com/lucas-clemente/quic-go/h2quic" "github.com/lucas-clemente/quic-go/integrationtests/tools/testserver" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" diff --git a/integrationtests/self/handshake_rtt_test.go b/integrationtests/self/handshake_rtt_test.go index 47ff6dfb..0987ea06 100644 --- a/integrationtests/self/handshake_rtt_test.go +++ b/integrationtests/self/handshake_rtt_test.go @@ -8,8 +8,8 @@ import ( quic "github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go/integrationtests/tools/proxy" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" "github.com/lucas-clemente/quic-go/internal/testdata" diff --git a/integrationtests/tools/proxy/proxy.go b/integrationtests/tools/proxy/proxy.go index 2b4edeba..78af9c10 100644 --- a/integrationtests/tools/proxy/proxy.go +++ b/integrationtests/tools/proxy/proxy.go @@ -7,8 +7,8 @@ import ( "sync/atomic" "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" ) // Connection is a UDP connection diff --git a/integrationtests/tools/proxy/proxy_test.go b/integrationtests/tools/proxy/proxy_test.go index 3b7f840b..88e94b16 100644 --- a/integrationtests/tools/proxy/proxy_test.go +++ b/integrationtests/tools/proxy/proxy_test.go @@ -9,8 +9,8 @@ import ( "fmt" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/interface.go b/interface.go index 771d98dd..a2078d43 100644 --- a/interface.go +++ b/interface.go @@ -6,7 +6,7 @@ import ( "net" "time" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) // Stream is the interface implemented by QUIC streams diff --git a/internal/mocks/cpm.go b/internal/mocks/cpm.go index 686928f6..4abe665d 100644 --- a/internal/mocks/cpm.go +++ b/internal/mocks/cpm.go @@ -4,10 +4,11 @@ package mocks import ( + time "time" + gomock "github.com/golang/mock/gomock" handshake "github.com/lucas-clemente/quic-go/handshake" - protocol "github.com/lucas-clemente/quic-go/protocol" - time "time" + protocol "github.com/lucas-clemente/quic-go/internal/protocol" ) // Mock of ConnectionParametersManager interface diff --git a/internal/mocks/mocks_fc/flow_control_manager.go b/internal/mocks/mocks_fc/flow_control_manager.go index d18bf48f..877a030e 100644 --- a/internal/mocks/mocks_fc/flow_control_manager.go +++ b/internal/mocks/mocks_fc/flow_control_manager.go @@ -6,7 +6,7 @@ package mocks_fc import ( gomock "github.com/golang/mock/gomock" flowcontrol "github.com/lucas-clemente/quic-go/flowcontrol" - protocol "github.com/lucas-clemente/quic-go/protocol" + protocol "github.com/lucas-clemente/quic-go/internal/protocol" ) // Mock of FlowControlManager interface diff --git a/protocol/encryption_level.go b/internal/protocol/encryption_level.go similarity index 100% rename from protocol/encryption_level.go rename to internal/protocol/encryption_level.go diff --git a/protocol/encryption_level_test.go b/internal/protocol/encryption_level_test.go similarity index 100% rename from protocol/encryption_level_test.go rename to internal/protocol/encryption_level_test.go diff --git a/protocol/packet_number.go b/internal/protocol/packet_number.go similarity index 100% rename from protocol/packet_number.go rename to internal/protocol/packet_number.go diff --git a/protocol/packet_number_test.go b/internal/protocol/packet_number_test.go similarity index 100% rename from protocol/packet_number_test.go rename to internal/protocol/packet_number_test.go diff --git a/protocol/perspective.go b/internal/protocol/perspective.go similarity index 100% rename from protocol/perspective.go rename to internal/protocol/perspective.go diff --git a/protocol/protocol.go b/internal/protocol/protocol.go similarity index 100% rename from protocol/protocol.go rename to internal/protocol/protocol.go diff --git a/protocol/protocol_suite_test.go b/internal/protocol/protocol_suite_test.go similarity index 100% rename from protocol/protocol_suite_test.go rename to internal/protocol/protocol_suite_test.go diff --git a/protocol/server_parameters.go b/internal/protocol/server_parameters.go similarity index 100% rename from protocol/server_parameters.go rename to internal/protocol/server_parameters.go diff --git a/protocol/version.go b/internal/protocol/version.go similarity index 100% rename from protocol/version.go rename to internal/protocol/version.go diff --git a/internal/protocol/version.go.orig b/internal/protocol/version.go.orig new file mode 100644 index 00000000..80a5eae2 --- /dev/null +++ b/internal/protocol/version.go.orig @@ -0,0 +1,61 @@ +package protocol + +// VersionNumber is a version number as int +type VersionNumber int + +// The version numbers, making grepping easier +const ( + Version35 VersionNumber = 35 + iota + Version36 + Version37 +<<<<<<< Updated upstream +======= + Version38 +>>>>>>> Stashed changes + Version39 + VersionWhatever VersionNumber = 0 // for when the version doesn't matter + VersionUnsupported VersionNumber = -1 + VersionUnknown VersionNumber = -2 +) + +// SupportedVersions lists the versions that the server supports +// must be in sorted descending order +var SupportedVersions = []VersionNumber{ + Version39, //Version37, Version36, Version35, +} + +// VersionNumberToTag maps version numbers ('32') to tags ('Q032') +func VersionNumberToTag(vn VersionNumber) uint32 { + v := uint32(vn) + return 'Q' + ((v/100%10)+'0')<<8 + ((v/10%10)+'0')<<16 + ((v%10)+'0')<<24 +} + +// VersionTagToNumber is built from VersionNumberToTag in init() +func VersionTagToNumber(v uint32) VersionNumber { + return VersionNumber(((v>>8)&0xff-'0')*100 + ((v>>16)&0xff-'0')*10 + ((v>>24)&0xff - '0')) +} + +// IsSupportedVersion returns true if the server supports this version +func IsSupportedVersion(supported []VersionNumber, v VersionNumber) bool { + for _, t := range supported { + if t == v { + return true + } + } + return false +} + +// ChooseSupportedVersion finds the best version in the overlap of ours and theirs +// ours is a slice of versions that we support, sorted by our preference (descending) +// theirs is a slice of versions offered by the peer. The order does not matter +// if no suitable version is found, it returns VersionUnsupported +func ChooseSupportedVersion(ours, theirs []VersionNumber) VersionNumber { + for _, ourVer := range ours { + for _, theirVer := range theirs { + if ourVer == theirVer { + return ourVer + } + } + } + return VersionUnsupported +} diff --git a/protocol/version_test.go b/internal/protocol/version_test.go similarity index 100% rename from protocol/version_test.go rename to internal/protocol/version_test.go diff --git a/internal/utils/byteorder.go b/internal/utils/byteorder.go index bfba0738..1598fac8 100644 --- a/internal/utils/byteorder.go +++ b/internal/utils/byteorder.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) // A ByteOrder specifies how to convert byte sequences into 16-, 32-, or 64-bit unsigned integers. diff --git a/internal/utils/byteorder_test.go b/internal/utils/byteorder_test.go index a1ddb8b0..16ba55c2 100644 --- a/internal/utils/byteorder_test.go +++ b/internal/utils/byteorder_test.go @@ -1,7 +1,7 @@ package utils import ( - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/utils/connection_id.go b/internal/utils/connection_id.go index c2252e6e..b4af4e78 100644 --- a/internal/utils/connection_id.go +++ b/internal/utils/connection_id.go @@ -4,7 +4,7 @@ import ( "crypto/rand" "encoding/binary" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) // GenerateConnectionID generates a connection ID using cryptographic random diff --git a/internal/utils/minmax.go b/internal/utils/minmax.go index 6e23df5a..c984a3c7 100644 --- a/internal/utils/minmax.go +++ b/internal/utils/minmax.go @@ -4,7 +4,7 @@ import ( "math" "time" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) // InfDuration is a duration of infinite length diff --git a/internal/utils/minmax_test.go b/internal/utils/minmax_test.go index 7d3df221..f9041472 100644 --- a/internal/utils/minmax_test.go +++ b/internal/utils/minmax_test.go @@ -3,7 +3,7 @@ package utils import ( "time" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/utils/packet_interval.go b/internal/utils/packet_interval.go index 09800b6b..f49b0c42 100644 --- a/internal/utils/packet_interval.go +++ b/internal/utils/packet_interval.go @@ -1,6 +1,6 @@ package utils -import "github.com/lucas-clemente/quic-go/protocol" +import "github.com/lucas-clemente/quic-go/internal/protocol" // PacketInterval is an interval from one PacketNumber to the other // +gen linkedlist diff --git a/internal/utils/streamframe_interval.go b/internal/utils/streamframe_interval.go index c918b62e..3c8325b2 100644 --- a/internal/utils/streamframe_interval.go +++ b/internal/utils/streamframe_interval.go @@ -1,6 +1,6 @@ package utils -import "github.com/lucas-clemente/quic-go/protocol" +import "github.com/lucas-clemente/quic-go/internal/protocol" // ByteInterval is an interval from one ByteCount to the other // +gen linkedlist diff --git a/internal/wire/ack_frame.go b/internal/wire/ack_frame.go index f6672827..c8a3f76c 100644 --- a/internal/wire/ack_frame.go +++ b/internal/wire/ack_frame.go @@ -5,8 +5,8 @@ import ( "errors" "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) var ( diff --git a/internal/wire/ack_frame_test.go b/internal/wire/ack_frame_test.go index 667e48ee..e9f0ab36 100644 --- a/internal/wire/ack_frame_test.go +++ b/internal/wire/ack_frame_test.go @@ -6,7 +6,7 @@ import ( "io" "time" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/wire/ack_range.go b/internal/wire/ack_range.go index bd8cab64..2f9fbe3e 100644 --- a/internal/wire/ack_range.go +++ b/internal/wire/ack_range.go @@ -1,6 +1,6 @@ package wire -import "github.com/lucas-clemente/quic-go/protocol" +import "github.com/lucas-clemente/quic-go/internal/protocol" // AckRange is an ACK range type AckRange struct { diff --git a/internal/wire/blocked_frame.go b/internal/wire/blocked_frame.go index 7bc9638e..76e38f02 100644 --- a/internal/wire/blocked_frame.go +++ b/internal/wire/blocked_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) // A BlockedFrame in QUIC diff --git a/internal/wire/blocked_frame_test.go b/internal/wire/blocked_frame_test.go index 9cb39f16..ac7048a3 100644 --- a/internal/wire/blocked_frame_test.go +++ b/internal/wire/blocked_frame_test.go @@ -3,7 +3,7 @@ package wire import ( "bytes" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/wire/connection_close_frame.go b/internal/wire/connection_close_frame.go index c703c510..96c25c1e 100644 --- a/internal/wire/connection_close_frame.go +++ b/internal/wire/connection_close_frame.go @@ -6,8 +6,8 @@ import ( "io" "math" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/internal/wire/connection_close_frame_test.go b/internal/wire/connection_close_frame_test.go index bb14ece3..351fa843 100644 --- a/internal/wire/connection_close_frame_test.go +++ b/internal/wire/connection_close_frame_test.go @@ -4,7 +4,7 @@ import ( "bytes" "strings" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/internal/wire/frame.go b/internal/wire/frame.go index 23fb2145..f31f5bf2 100644 --- a/internal/wire/frame.go +++ b/internal/wire/frame.go @@ -3,7 +3,7 @@ package wire import ( "bytes" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) // A Frame in QUIC diff --git a/internal/wire/goaway_frame.go b/internal/wire/goaway_frame.go index 61ccc380..5332210d 100644 --- a/internal/wire/goaway_frame.go +++ b/internal/wire/goaway_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "io" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/internal/wire/goaway_frame_test.go b/internal/wire/goaway_frame_test.go index 22741647..f9b02db1 100644 --- a/internal/wire/goaway_frame_test.go +++ b/internal/wire/goaway_frame_test.go @@ -3,7 +3,7 @@ package wire import ( "bytes" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" diff --git a/internal/wire/log_test.go b/internal/wire/log_test.go index 6e85aedb..33547efa 100644 --- a/internal/wire/log_test.go +++ b/internal/wire/log_test.go @@ -6,8 +6,8 @@ import ( "os" "time" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/internal/wire/ping_frame.go b/internal/wire/ping_frame.go index b32306bc..2a09c33a 100644 --- a/internal/wire/ping_frame.go +++ b/internal/wire/ping_frame.go @@ -3,7 +3,7 @@ package wire import ( "bytes" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) // A PingFrame is a ping frame diff --git a/internal/wire/ping_frame_test.go b/internal/wire/ping_frame_test.go index 2446abf5..d0627a6f 100644 --- a/internal/wire/ping_frame_test.go +++ b/internal/wire/ping_frame_test.go @@ -3,7 +3,7 @@ package wire import ( "bytes" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/wire/public_header.go b/internal/wire/public_header.go index 20fec06a..adc1a11a 100644 --- a/internal/wire/public_header.go +++ b/internal/wire/public_header.go @@ -5,8 +5,8 @@ import ( "errors" "io" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/internal/wire/public_header_test.go b/internal/wire/public_header_test.go index fbad6919..3265617c 100644 --- a/internal/wire/public_header_test.go +++ b/internal/wire/public_header_test.go @@ -4,8 +4,8 @@ import ( "bytes" "encoding/binary" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/internal/wire/public_reset.go b/internal/wire/public_reset.go index 7e8c162e..e7a5f0b4 100644 --- a/internal/wire/public_reset.go +++ b/internal/wire/public_reset.go @@ -6,8 +6,8 @@ import ( "errors" "github.com/lucas-clemente/quic-go/handshake" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) // A PublicReset is a PUBLIC_RESET diff --git a/internal/wire/public_reset_test.go b/internal/wire/public_reset_test.go index a8d751b1..fcd2f1bf 100644 --- a/internal/wire/public_reset_test.go +++ b/internal/wire/public_reset_test.go @@ -5,7 +5,7 @@ import ( "io" "github.com/lucas-clemente/quic-go/handshake" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/wire/rst_stream_frame.go b/internal/wire/rst_stream_frame.go index 4a510013..04086f83 100644 --- a/internal/wire/rst_stream_frame.go +++ b/internal/wire/rst_stream_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) // A RstStreamFrame in QUIC diff --git a/internal/wire/rst_stream_frame_test.go b/internal/wire/rst_stream_frame_test.go index 21ffc16b..53c6e157 100644 --- a/internal/wire/rst_stream_frame_test.go +++ b/internal/wire/rst_stream_frame_test.go @@ -3,7 +3,7 @@ package wire import ( "bytes" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/wire/stop_waiting_frame.go b/internal/wire/stop_waiting_frame.go index 056e6cb9..9eb068dc 100644 --- a/internal/wire/stop_waiting_frame.go +++ b/internal/wire/stop_waiting_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "errors" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/internal/wire/stop_waiting_frame_test.go b/internal/wire/stop_waiting_frame_test.go index f5be38b6..02e7dd3f 100644 --- a/internal/wire/stop_waiting_frame_test.go +++ b/internal/wire/stop_waiting_frame_test.go @@ -3,7 +3,7 @@ package wire import ( "bytes" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/wire/stream_frame.go b/internal/wire/stream_frame.go index ce7be276..1da780c3 100644 --- a/internal/wire/stream_frame.go +++ b/internal/wire/stream_frame.go @@ -5,8 +5,8 @@ import ( "errors" "io" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/internal/wire/stream_frame_test.go b/internal/wire/stream_frame_test.go index 93876573..46b29387 100644 --- a/internal/wire/stream_frame_test.go +++ b/internal/wire/stream_frame_test.go @@ -3,7 +3,7 @@ package wire import ( "bytes" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/internal/wire/version_negotiation.go b/internal/wire/version_negotiation.go index 7d3f6f23..9caa7fb4 100644 --- a/internal/wire/version_negotiation.go +++ b/internal/wire/version_negotiation.go @@ -3,8 +3,8 @@ package wire import ( "bytes" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) // ComposeVersionNegotiation composes a Version Negotiation Packet diff --git a/internal/wire/version_negotiation_test.go b/internal/wire/version_negotiation_test.go index 172d78e3..39b9fb65 100644 --- a/internal/wire/version_negotiation_test.go +++ b/internal/wire/version_negotiation_test.go @@ -1,7 +1,7 @@ package wire import ( - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/wire/window_update_frame.go b/internal/wire/window_update_frame.go index 7f888dfe..fe896e7a 100644 --- a/internal/wire/window_update_frame.go +++ b/internal/wire/window_update_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" ) // A WindowUpdateFrame in QUIC diff --git a/internal/wire/window_update_frame_test.go b/internal/wire/window_update_frame_test.go index e5239a95..a54f004d 100644 --- a/internal/wire/window_update_frame_test.go +++ b/internal/wire/window_update_frame_test.go @@ -3,7 +3,7 @@ package wire import ( "bytes" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/wire/wire_suite_test.go b/internal/wire/wire_suite_test.go index 8f077fd5..322b9ede 100644 --- a/internal/wire/wire_suite_test.go +++ b/internal/wire/wire_suite_test.go @@ -1,8 +1,8 @@ package wire import ( + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/packet_number_generator.go b/packet_number_generator.go index 71ca9a3c..8ece95ac 100644 --- a/packet_number_generator.go +++ b/packet_number_generator.go @@ -4,7 +4,7 @@ import ( "crypto/rand" "math" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" ) // The packetNumberGenerator generates the packet number for the next packet diff --git a/packet_number_generator_test.go b/packet_number_generator_test.go index f1f87fe5..1f00cb75 100644 --- a/packet_number_generator_test.go +++ b/packet_number_generator_test.go @@ -3,7 +3,7 @@ package quic import ( "math" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/packet_packer.go b/packet_packer.go index 876f4f20..eeeba0a7 100644 --- a/packet_packer.go +++ b/packet_packer.go @@ -7,8 +7,8 @@ import ( "github.com/lucas-clemente/quic-go/ackhandler" "github.com/lucas-clemente/quic-go/handshake" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" ) type packedPacket struct { diff --git a/packet_packer_test.go b/packet_packer_test.go index 778a485d..a50f76aa 100644 --- a/packet_packer_test.go +++ b/packet_packer_test.go @@ -7,8 +7,8 @@ import ( "github.com/lucas-clemente/quic-go/ackhandler" "github.com/lucas-clemente/quic-go/handshake" "github.com/lucas-clemente/quic-go/internal/mocks" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/packet_unpacker.go b/packet_unpacker.go index 437efd9b..055f6754 100644 --- a/packet_unpacker.go +++ b/packet_unpacker.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/packet_unpacker_test.go b/packet_unpacker_test.go index 4983fa84..418ab922 100644 --- a/packet_unpacker_test.go +++ b/packet_unpacker_test.go @@ -4,8 +4,8 @@ import ( "bytes" "github.com/lucas-clemente/quic-go/crypto" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" diff --git a/server.go b/server.go index e27f7f1c..8ff54792 100644 --- a/server.go +++ b/server.go @@ -10,9 +10,9 @@ import ( "github.com/lucas-clemente/quic-go/crypto" "github.com/lucas-clemente/quic-go/handshake" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/server_test.go b/server_test.go index e86634de..679b2bec 100644 --- a/server_test.go +++ b/server_test.go @@ -11,9 +11,9 @@ import ( "github.com/lucas-clemente/quic-go/crypto" "github.com/lucas-clemente/quic-go/handshake" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" diff --git a/session.go b/session.go index 61a14164..baa748af 100644 --- a/session.go +++ b/session.go @@ -13,9 +13,9 @@ import ( "github.com/lucas-clemente/quic-go/congestion" "github.com/lucas-clemente/quic-go/flowcontrol" "github.com/lucas-clemente/quic-go/handshake" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/session_test.go b/session_test.go index 69aebc10..2086065b 100644 --- a/session_test.go +++ b/session_test.go @@ -19,9 +19,9 @@ import ( "github.com/lucas-clemente/quic-go/handshake" "github.com/lucas-clemente/quic-go/internal/mocks" "github.com/lucas-clemente/quic-go/internal/mocks/mocks_fc" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/testdata" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/stream.go b/stream.go index 4631ed01..cf344682 100644 --- a/stream.go +++ b/stream.go @@ -9,9 +9,9 @@ import ( "time" "github.com/lucas-clemente/quic-go/flowcontrol" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" ) // A Stream assembles the data from StreamFrames and provides a super-convenient Read-Interface diff --git a/stream_frame_sorter.go b/stream_frame_sorter.go index cb2da818..e3a3a807 100644 --- a/stream_frame_sorter.go +++ b/stream_frame_sorter.go @@ -3,9 +3,9 @@ package quic import ( "errors" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" ) type streamFrameSorter struct { diff --git a/stream_frame_sorter_test.go b/stream_frame_sorter_test.go index 0517d4e6..3980e568 100644 --- a/stream_frame_sorter_test.go +++ b/stream_frame_sorter_test.go @@ -3,9 +3,9 @@ package quic import ( "bytes" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/stream_framer.go b/stream_framer.go index 3ae4ef97..e7175425 100644 --- a/stream_framer.go +++ b/stream_framer.go @@ -2,9 +2,9 @@ package quic import ( "github.com/lucas-clemente/quic-go/flowcontrol" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" ) type streamFramer struct { diff --git a/stream_framer_test.go b/stream_framer_test.go index 5bf8f321..a93d068a 100644 --- a/stream_framer_test.go +++ b/stream_framer_test.go @@ -4,8 +4,8 @@ import ( "bytes" "github.com/lucas-clemente/quic-go/internal/mocks/mocks_fc" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/stream_test.go b/stream_test.go index d941a698..ad73469f 100644 --- a/stream_test.go +++ b/stream_test.go @@ -10,8 +10,8 @@ import ( "os" "github.com/lucas-clemente/quic-go/internal/mocks/mocks_fc" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/protocol" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/streams_map.go b/streams_map.go index 74be17e0..6b0eba8d 100644 --- a/streams_map.go +++ b/streams_map.go @@ -6,7 +6,7 @@ import ( "sync" "github.com/lucas-clemente/quic-go/handshake" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/qerr" ) diff --git a/streams_map_test.go b/streams_map_test.go index db6ecede..3c7f02fb 100644 --- a/streams_map_test.go +++ b/streams_map_test.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/lucas-clemente/quic-go/internal/mocks" - "github.com/lucas-clemente/quic-go/protocol" + "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega"