| 1 |
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd |
| 2 |
|
| 3 |
package dns |
| 4 |
|
| 5 |
import ( |
| 6 |
"fmt" |
| 7 |
"net" |
| 8 |
) |
| 9 |
|
| 10 |
func listenTCP(network, addr string, reuseport, reuseaddr bool) (net.Listener, error) { |
| 11 |
if reuseport || reuseaddr { |
| 12 |
// TODO(tmthrgd): return an error? |
| 13 |
} |
| 14 |
|
| 15 |
return net.Listen(network, addr) |
| 16 |
} |
| 17 |
|
| 18 |
func listenUDP(network, addr string, reuseport, reuseaddr bool) (net.PacketConn, error) { |
| 19 |
if reuseport || reuseaddr { |
| 20 |
// TODO(tmthrgd): return an error? |
| 21 |
} |
| 22 |
|
| 23 |
return net.ListenPacket(network, addr) |
| 24 |
} |
| 25 |
|
| 26 |
// this is just for test compatibility |
| 27 |
func checkReuseport(_ uintptr) (bool, error) { |
| 28 |
return false, fmt.Errorf("not supported") |
| 29 |
} |
| 30 |
|
| 31 |
// this is just for test compatibility |
| 32 |
func checkReuseaddr(_ uintptr) (bool, error) { |
| 33 |
return false, fmt.Errorf("not supported") |
| 34 |
} |