move EntropyAccumulator to AckHandler package

This commit is contained in:
Marten Seemann
2016-04-21 08:41:54 +07:00
parent 6d9d9a1c29
commit 4b0b8def8d
3 changed files with 7 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
package quic
package ackhandler
import "github.com/lucas-clemente/quic-go/protocol"

View File

@@ -1,4 +1,4 @@
package quic
package ackhandler
import (
. "github.com/onsi/ginkgo"

View File

@@ -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)