add GetIdleConnectionStateLifetime to connection params

This commit is contained in:
Lucas Clemente
2016-05-05 22:58:59 +02:00
parent 76d279ed8f
commit b239b71bb4
2 changed files with 23 additions and 0 deletions

View File

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