rename files dealing with low level conns to sys_conn

This commit is contained in:
Marten Seemann 2022-03-27 10:03:18 +01:00
parent f68b38635a
commit 3126062aa7
14 changed files with 9 additions and 2 deletions

33
sys_conn_windows_test.go Normal file
View file

@ -0,0 +1,33 @@
//go:build windows
// +build windows
package quic
import (
"net"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Windows Conn Test", func() {
It("works on IPv4", func() {
addr, err := net.ResolveUDPAddr("udp4", "localhost:0")
Expect(err).ToNot(HaveOccurred())
udpConn, err := net.ListenUDP("udp4", addr)
Expect(err).ToNot(HaveOccurred())
conn, err := newConn(udpConn)
Expect(err).ToNot(HaveOccurred())
Expect(conn.Close()).To(Succeed())
})
It("works on IPv6", func() {
addr, err := net.ResolveUDPAddr("udp6", "[::1]:0")
Expect(err).ToNot(HaveOccurred())
udpConn, err := net.ListenUDP("udp6", addr)
Expect(err).ToNot(HaveOccurred())
conn, err := newConn(udpConn)
Expect(err).ToNot(HaveOccurred())
Expect(conn.Close()).To(Succeed())
})
})