2023-01-05 06:53:57 +00:00
|
|
|
//go:build !go1.11 || (!aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd)
|
2018-09-26 08:12:54 +00:00
|
|
|
// +build !go1.11 !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd
|
2018-09-10 10:42:54 +00:00
|
|
|
|
|
|
|
package dns
|
|
|
|
|
|
|
|
import "net"
|
|
|
|
|
|
|
|
const supportsReusePort = false
|
|
|
|
|
|
|
|
func listenTCP(network, addr string, reuseport bool) (net.Listener, error) {
|
|
|
|
if reuseport {
|
|
|
|
// TODO(tmthrgd): return an error?
|
|
|
|
}
|
|
|
|
|
|
|
|
return net.Listen(network, addr)
|
|
|
|
}
|
|
|
|
|
|
|
|
func listenUDP(network, addr string, reuseport bool) (net.PacketConn, error) {
|
|
|
|
if reuseport {
|
|
|
|
// TODO(tmthrgd): return an error?
|
|
|
|
}
|
|
|
|
|
|
|
|
return net.ListenPacket(network, addr)
|
|
|
|
}
|