make EarlyListener a struct, not an interface

This commit is contained in:
Marten Seemann 2023-03-25 09:19:23 +11:00
parent 1b64b13750
commit 86a1234c87
13 changed files with 174 additions and 164 deletions

View file

@ -18,14 +18,14 @@ import (
)
type listenerWrapper struct {
quic.EarlyListener
http3.QUICEarlyListener
listenerClosed bool
count int32
}
func (ln *listenerWrapper) Close() error {
ln.listenerClosed = true
return ln.EarlyListener.Close()
return ln.QUICEarlyListener.Close()
}
func (ln *listenerWrapper) Faker() *fakeClosingListener {
@ -91,7 +91,7 @@ var _ = Describe("HTTP3 Server hotswap test", func() {
tlsConf := http3.ConfigureTLSConfig(getTLSConfig())
quicln, err := quic.ListenAddrEarly("0.0.0.0:0", tlsConf, getQuicConfig(nil))
ln = &listenerWrapper{EarlyListener: quicln}
ln = &listenerWrapper{QUICEarlyListener: quicln}
Expect(err).NotTo(HaveOccurred())
port = strconv.Itoa(ln.Addr().(*net.UDPAddr).Port)
})

View file

@ -99,7 +99,7 @@ var _ = Describe("0-RTT", func() {
}
transfer0RTTData := func(
ln quic.EarlyListener,
ln *quic.EarlyListener,
proxyPort int,
clientTLSConf *tls.Config,
clientConf *quic.Config,
@ -147,7 +147,7 @@ var _ = Describe("0-RTT", func() {
}
check0RTTRejected := func(
ln quic.EarlyListener,
ln *quic.EarlyListener,
proxyPort int,
clientConf *tls.Config,
) {