forked from quic-go/quic-go
rename the IdleConnectionStateLifetime to RemoteIdleTimeout
This commit is contained in:
@@ -440,7 +440,7 @@ var _ = Describe("Client Crypto Setup", func() {
|
||||
shloMap[TagICSL] = []byte{3, 0, 0, 0} // 3 seconds
|
||||
err := cs.handleSHLOMessage(shloMap)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(cs.params.GetIdleConnectionStateLifetime()).To(Equal(3 * time.Second))
|
||||
Expect(cs.params.GetRemoteIdleTimeout()).To(Equal(3 * time.Second))
|
||||
})
|
||||
|
||||
It("errors if it can't read a connection parameter", func() {
|
||||
|
||||
@@ -20,7 +20,7 @@ type ParamsNegotiator interface {
|
||||
GetMaxOutgoingStreams() uint32
|
||||
GetMaxIncomingStreams() uint32
|
||||
// get the idle timeout that was sent by the peer
|
||||
GetIdleConnectionStateLifetime() time.Duration
|
||||
GetRemoteIdleTimeout() time.Duration
|
||||
// determines if the client requests omission of connection IDs.
|
||||
OmitConnectionID() bool
|
||||
}
|
||||
@@ -132,7 +132,7 @@ func (h *paramsNegotiatorBase) GetMaxIncomingStreams() uint32 {
|
||||
return utils.MaxUint32(uint32(maxStreams)+protocol.MaxStreamsMinimumIncrement, uint32(float64(maxStreams)*protocol.MaxStreamsMultiplier))
|
||||
}
|
||||
|
||||
func (h *paramsNegotiatorBase) GetIdleConnectionStateLifetime() time.Duration {
|
||||
func (h *paramsNegotiatorBase) GetRemoteIdleTimeout() time.Duration {
|
||||
h.mutex.RLock()
|
||||
defer h.mutex.RUnlock()
|
||||
return h.remoteIdleTimeout
|
||||
|
||||
@@ -218,7 +218,7 @@ var _ = Describe("Params Negotiator (for gQUIC)", func() {
|
||||
}
|
||||
err := pn.SetFromMap(values)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(pn.GetIdleConnectionStateLifetime()).To(Equal(10 * time.Second))
|
||||
Expect(pn.GetRemoteIdleTimeout()).To(Equal(10 * time.Second))
|
||||
})
|
||||
|
||||
It("errors when given an invalid value", func() {
|
||||
|
||||
@@ -71,7 +71,7 @@ var _ = Describe("Params Negotiator (for TLS)", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(pn.GetSendStreamFlowControlWindow()).To(Equal(protocol.ByteCount(0x11223344)))
|
||||
Expect(pn.GetSendConnectionFlowControlWindow()).To(Equal(protocol.ByteCount(0x22334455)))
|
||||
Expect(pn.GetIdleConnectionStateLifetime()).To(Equal(0x1337 * time.Second))
|
||||
Expect(pn.GetRemoteIdleTimeout()).To(Equal(0x1337 * time.Second))
|
||||
Expect(pn.OmitConnectionID()).To(BeFalse())
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user