forked from quic-go/quic-go
add GetIdleConnectionStateLifetime to connection params
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package handshake
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/protocol"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
@@ -57,4 +59,11 @@ var _ = Describe("ConnectionsParameterManager", func() {
|
||||
Expect(val).To(Equal(protocol.ByteCount(0xEFBEADDE)))
|
||||
})
|
||||
})
|
||||
|
||||
It("gets idle connection state lifetime", func() {
|
||||
cpm.params[TagICSL] = []byte{0xad, 0xfb, 0xca, 0xde}
|
||||
val, err := cpm.GetIdleConnectionStateLifetime()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(val).To(Equal(0xdecafbad * time.Second))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user