mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
sync: quic-go 0.42.0
Signed-off-by: Gaukas Wang <i@gaukas.wang>
This commit is contained in:
parent
d40dde9b9b
commit
4973374ea5
252 changed files with 13121 additions and 5437 deletions
|
@ -73,6 +73,7 @@ var _ = Describe("Multiplexing", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
defer conn.Close()
|
||||
tr := &quic.Transport{Conn: conn}
|
||||
addTracer(tr)
|
||||
|
||||
done1 := make(chan struct{})
|
||||
done2 := make(chan struct{})
|
||||
|
@ -108,6 +109,7 @@ var _ = Describe("Multiplexing", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
defer conn.Close()
|
||||
tr := &quic.Transport{Conn: conn}
|
||||
addTracer(tr)
|
||||
|
||||
done1 := make(chan struct{})
|
||||
done2 := make(chan struct{})
|
||||
|
@ -138,6 +140,7 @@ var _ = Describe("Multiplexing", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
defer conn.Close()
|
||||
tr := &quic.Transport{Conn: conn}
|
||||
addTracer(tr)
|
||||
server, err := tr.Listen(
|
||||
getTLSConfig(),
|
||||
getQuicConfig(nil),
|
||||
|
@ -166,6 +169,7 @@ var _ = Describe("Multiplexing", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
defer conn1.Close()
|
||||
tr1 := &quic.Transport{Conn: conn1}
|
||||
addTracer(tr1)
|
||||
|
||||
addr2, err := net.ResolveUDPAddr("udp", "localhost:0")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
@ -173,6 +177,7 @@ var _ = Describe("Multiplexing", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
defer conn2.Close()
|
||||
tr2 := &quic.Transport{Conn: conn2}
|
||||
addTracer(tr2)
|
||||
|
||||
server1, err := tr1.Listen(
|
||||
getTLSConfig(),
|
||||
|
@ -219,6 +224,7 @@ var _ = Describe("Multiplexing", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
defer conn1.Close()
|
||||
tr1 := &quic.Transport{Conn: conn1}
|
||||
addTracer(tr1)
|
||||
|
||||
addr2, err := net.ResolveUDPAddr("udp", "localhost:0")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
@ -226,6 +232,7 @@ var _ = Describe("Multiplexing", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
defer conn2.Close()
|
||||
tr2 := &quic.Transport{Conn: conn2}
|
||||
addTracer(tr2)
|
||||
|
||||
server, err := tr1.Listen(getTLSConfig(), getQuicConfig(nil))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
@ -250,6 +257,9 @@ var _ = Describe("Multiplexing", func() {
|
|||
b := make([]byte, packetLen)
|
||||
rand.Read(b[1:]) // keep the first byte set to 0, so it's not classified as a QUIC packet
|
||||
_, err := tr1.WriteTo(b, tr2.Conn.LocalAddr())
|
||||
if ctx.Err() != nil { // ctx canceled while Read was executing
|
||||
return
|
||||
}
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
sentPackets.Add(1)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue