introduce a test helper function to create a UDP socket on localhost (#4756)

This commit is contained in:
Marten Seemann
2024-12-17 23:30:00 +08:00
committed by GitHub
parent 8cb88ee145
commit 3886be4e95
29 changed files with 499 additions and 680 deletions

View File

@@ -78,9 +78,9 @@ func TestHTTP3ServerHotswap(t *testing.T) {
}
tlsConf := http3.ConfigureTLSConfig(getTLSConfig())
quicln, err := quic.ListenAddrEarly("0.0.0.0:0", tlsConf, getQuicConfig(nil))
quicLn, err := quic.ListenEarly(newUPDConnLocalhost(t), tlsConf, getQuicConfig(nil))
require.NoError(t, err)
ln := &listenerWrapper{QUICEarlyListener: quicln}
ln := &listenerWrapper{QUICEarlyListener: quicLn}
port := strconv.Itoa(ln.Addr().(*net.UDPAddr).Port)
rt := &http3.Transport{