rename the IdleConnectionStateLifetime to RemoteIdleTimeout

This commit is contained in:
Marten Seemann
2017-10-03 10:48:08 -07:00
parent a8b603b7bf
commit 0ffb64b5d7
8 changed files with 106 additions and 107 deletions

View File

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

View File

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

View File

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

View File

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