diff --git a/entropy_accumulator.go b/ackhandler/entropy_accumulator.go similarity index 96% rename from entropy_accumulator.go rename to ackhandler/entropy_accumulator.go index 14594eef1..fe120571e 100644 --- a/entropy_accumulator.go +++ b/ackhandler/entropy_accumulator.go @@ -1,4 +1,4 @@ -package quic +package ackhandler import "github.com/lucas-clemente/quic-go/protocol" diff --git a/entropy_accumulator_test.go b/ackhandler/entropy_accumulator_test.go similarity index 96% rename from entropy_accumulator_test.go rename to ackhandler/entropy_accumulator_test.go index 5b149a227..adb7f0974 100644 --- a/entropy_accumulator_test.go +++ b/ackhandler/entropy_accumulator_test.go @@ -1,4 +1,4 @@ -package quic +package ackhandler import ( . "github.com/onsi/ginkgo" diff --git a/session.go b/session.go index 4321ddbcc..dd7eec5b9 100644 --- a/session.go +++ b/session.go @@ -8,6 +8,7 @@ import ( "net" "sync" + "github.com/lucas-clemente/quic-go/ackhandler" "github.com/lucas-clemente/quic-go/errorcodes" "github.com/lucas-clemente/quic-go/frames" "github.com/lucas-clemente/quic-go/handshake" @@ -29,9 +30,9 @@ type Session struct { ServerConfig *handshake.ServerConfig cryptoSetup *handshake.CryptoSetup - EntropyReceived EntropyAccumulator - EntropySent EntropyAccumulator - EntropyHistory map[protocol.PacketNumber]EntropyAccumulator // ToDo: store this with the packet itself + EntropyReceived ackhandler.EntropyAccumulator + EntropySent ackhandler.EntropyAccumulator + EntropyHistory map[protocol.PacketNumber]ackhandler.EntropyAccumulator // ToDo: store this with the packet itself entropyHistoryMutex sync.Mutex lastSentPacketNumber protocol.PacketNumber @@ -55,7 +56,7 @@ func NewSession(conn *net.UDPConn, v protocol.VersionNumber, connectionID protoc streamCallback: streamCallback, lastObservedPacketNumber: 0, Streams: make(map[protocol.StreamID]*Stream), - EntropyHistory: make(map[protocol.PacketNumber]EntropyAccumulator), + EntropyHistory: make(map[protocol.PacketNumber]ackhandler.EntropyAccumulator), } cryptoStream, _ := session.NewStream(1)