dnscrypt-proxy/vendor/github.com/miekg/dns/listen_no_reuseport.go

27 lines
644 B
Go
Raw Normal View History

2023-03-23 12:54:45 +01:00
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd
// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd
2018-10-02 18:06:43 +02:00
package dns
import "net"
const supportsReusePort = false
2023-11-16 00:51:48 +01:00
func listenTCP(network, addr string, reuseport, reuseaddr bool) (net.Listener, error) {
if reuseport || reuseaddr {
2018-10-02 18:06:43 +02:00
// TODO(tmthrgd): return an error?
}
return net.Listen(network, addr)
}
2023-11-16 00:51:48 +01:00
const supportsReuseAddr = false
func listenUDP(network, addr string, reuseport, reuseaddr bool) (net.PacketConn, error) {
if reuseport || reuseaddr {
2018-10-02 18:06:43 +02:00
// TODO(tmthrgd): return an error?
}
return net.ListenPacket(network, addr)
}