forked from quic-go/quic-go
move EntropyAccumulator to AckHandler package
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
package quic
|
package ackhandler
|
||||||
|
|
||||||
import "github.com/lucas-clemente/quic-go/protocol"
|
import "github.com/lucas-clemente/quic-go/protocol"
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package quic
|
package ackhandler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
@@ -8,6 +8,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/lucas-clemente/quic-go/ackhandler"
|
||||||
"github.com/lucas-clemente/quic-go/errorcodes"
|
"github.com/lucas-clemente/quic-go/errorcodes"
|
||||||
"github.com/lucas-clemente/quic-go/frames"
|
"github.com/lucas-clemente/quic-go/frames"
|
||||||
"github.com/lucas-clemente/quic-go/handshake"
|
"github.com/lucas-clemente/quic-go/handshake"
|
||||||
@@ -29,9 +30,9 @@ type Session struct {
|
|||||||
ServerConfig *handshake.ServerConfig
|
ServerConfig *handshake.ServerConfig
|
||||||
cryptoSetup *handshake.CryptoSetup
|
cryptoSetup *handshake.CryptoSetup
|
||||||
|
|
||||||
EntropyReceived EntropyAccumulator
|
EntropyReceived ackhandler.EntropyAccumulator
|
||||||
EntropySent EntropyAccumulator
|
EntropySent ackhandler.EntropyAccumulator
|
||||||
EntropyHistory map[protocol.PacketNumber]EntropyAccumulator // ToDo: store this with the packet itself
|
EntropyHistory map[protocol.PacketNumber]ackhandler.EntropyAccumulator // ToDo: store this with the packet itself
|
||||||
entropyHistoryMutex sync.Mutex
|
entropyHistoryMutex sync.Mutex
|
||||||
|
|
||||||
lastSentPacketNumber protocol.PacketNumber
|
lastSentPacketNumber protocol.PacketNumber
|
||||||
@@ -55,7 +56,7 @@ func NewSession(conn *net.UDPConn, v protocol.VersionNumber, connectionID protoc
|
|||||||
streamCallback: streamCallback,
|
streamCallback: streamCallback,
|
||||||
lastObservedPacketNumber: 0,
|
lastObservedPacketNumber: 0,
|
||||||
Streams: make(map[protocol.StreamID]*Stream),
|
Streams: make(map[protocol.StreamID]*Stream),
|
||||||
EntropyHistory: make(map[protocol.PacketNumber]EntropyAccumulator),
|
EntropyHistory: make(map[protocol.PacketNumber]ackhandler.EntropyAccumulator),
|
||||||
}
|
}
|
||||||
|
|
||||||
cryptoStream, _ := session.NewStream(1)
|
cryptoStream, _ := session.NewStream(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user