mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
add Allow0RTT opt in the quic.Config to control 0-RTT on the server side (#3635)
This commit is contained in:
parent
421893b1c4
commit
b52d34008f
12 changed files with 98 additions and 51 deletions
|
@ -286,14 +286,12 @@ var _ = Describe("Server", func() {
|
|||
_ *Config,
|
||||
_ *tls.Config,
|
||||
_ *handshake.TokenGenerator,
|
||||
enable0RTT bool,
|
||||
_ bool,
|
||||
_ logging.ConnectionTracer,
|
||||
_ uint64,
|
||||
_ utils.Logger,
|
||||
_ protocol.VersionNumber,
|
||||
) quicConn {
|
||||
Expect(enable0RTT).To(BeFalse())
|
||||
Expect(origDestConnID).To(Equal(protocol.ParseConnectionID([]byte{0xde, 0xad, 0xc0, 0xde})))
|
||||
Expect(*retrySrcConnID).To(Equal(protocol.ParseConnectionID([]byte{0xde, 0xca, 0xfb, 0xad})))
|
||||
Expect(clientDestConnID).To(Equal(hdr.DestConnectionID))
|
||||
|
@ -489,14 +487,12 @@ var _ = Describe("Server", func() {
|
|||
_ *Config,
|
||||
_ *tls.Config,
|
||||
_ *handshake.TokenGenerator,
|
||||
enable0RTT bool,
|
||||
_ bool,
|
||||
_ logging.ConnectionTracer,
|
||||
_ uint64,
|
||||
_ utils.Logger,
|
||||
_ protocol.VersionNumber,
|
||||
) quicConn {
|
||||
Expect(enable0RTT).To(BeFalse())
|
||||
Expect(origDestConnID).To(Equal(hdr.DestConnectionID))
|
||||
Expect(retrySrcConnID).To(BeNil())
|
||||
Expect(clientDestConnID).To(Equal(hdr.DestConnectionID))
|
||||
|
@ -550,7 +546,6 @@ var _ = Describe("Server", func() {
|
|||
_ *tls.Config,
|
||||
_ *handshake.TokenGenerator,
|
||||
_ bool,
|
||||
_ bool,
|
||||
_ logging.ConnectionTracer,
|
||||
_ uint64,
|
||||
_ utils.Logger,
|
||||
|
@ -604,7 +599,6 @@ var _ = Describe("Server", func() {
|
|||
_ *tls.Config,
|
||||
_ *handshake.TokenGenerator,
|
||||
_ bool,
|
||||
_ bool,
|
||||
_ logging.ConnectionTracer,
|
||||
_ uint64,
|
||||
_ utils.Logger,
|
||||
|
@ -634,7 +628,6 @@ var _ = Describe("Server", func() {
|
|||
_ *tls.Config,
|
||||
_ *handshake.TokenGenerator,
|
||||
_ bool,
|
||||
_ bool,
|
||||
_ logging.ConnectionTracer,
|
||||
_ uint64,
|
||||
_ utils.Logger,
|
||||
|
@ -705,7 +698,6 @@ var _ = Describe("Server", func() {
|
|||
_ *tls.Config,
|
||||
_ *handshake.TokenGenerator,
|
||||
_ bool,
|
||||
_ bool,
|
||||
_ logging.ConnectionTracer,
|
||||
_ uint64,
|
||||
_ utils.Logger,
|
||||
|
@ -1011,7 +1003,6 @@ var _ = Describe("Server", func() {
|
|||
_ *tls.Config,
|
||||
_ *handshake.TokenGenerator,
|
||||
_ bool,
|
||||
_ bool,
|
||||
_ logging.ConnectionTracer,
|
||||
_ uint64,
|
||||
_ utils.Logger,
|
||||
|
@ -1084,14 +1075,12 @@ var _ = Describe("Server", func() {
|
|||
_ *Config,
|
||||
_ *tls.Config,
|
||||
_ *handshake.TokenGenerator,
|
||||
enable0RTT bool,
|
||||
_ bool,
|
||||
_ logging.ConnectionTracer,
|
||||
_ uint64,
|
||||
_ utils.Logger,
|
||||
_ protocol.VersionNumber,
|
||||
) quicConn {
|
||||
Expect(enable0RTT).To(BeTrue())
|
||||
conn.EXPECT().handlePacket(gomock.Any())
|
||||
conn.EXPECT().run().Do(func() {})
|
||||
conn.EXPECT().earlyConnReady().Return(ready)
|
||||
|
@ -1128,7 +1117,6 @@ var _ = Describe("Server", func() {
|
|||
_ *tls.Config,
|
||||
_ *handshake.TokenGenerator,
|
||||
_ bool,
|
||||
_ bool,
|
||||
_ logging.ConnectionTracer,
|
||||
_ uint64,
|
||||
_ utils.Logger,
|
||||
|
@ -1191,7 +1179,6 @@ var _ = Describe("Server", func() {
|
|||
_ *tls.Config,
|
||||
_ *handshake.TokenGenerator,
|
||||
_ bool,
|
||||
_ bool,
|
||||
_ logging.ConnectionTracer,
|
||||
_ uint64,
|
||||
_ utils.Logger,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue