| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
package dns |
| 5 |
|
| 6 |
import ( |
| 7 |
"fmt" |
| 8 |
"net" |
| 9 |
) |
| 10 |
|
| 11 |
const ( |
| 12 |
supportsReusePort = false |
| 13 |
supportsReuseAddr = false |
| 14 |
) |
| 15 |
|
| 16 |
func listenTCP(network, addr string, reuseport, reuseaddr bool) (net.Listener, error) { |
| 17 |
if reuseport || reuseaddr { |
| 18 |
|
| 19 |
} |
| 20 |
|
| 21 |
return net.Listen(network, addr) |
| 22 |
} |
| 23 |
|
| 24 |
func listenUDP(network, addr string, reuseport, reuseaddr bool) (net.PacketConn, error) { |
| 25 |
if reuseport || reuseaddr { |
| 26 |
|
| 27 |
} |
| 28 |
|
| 29 |
return net.ListenPacket(network, addr) |
| 30 |
} |
| 31 |
|
| 32 |
|
| 33 |
func checkReuseport(fd uintptr) (bool, error) { |
| 34 |
return false, fmt.Errorf("not supported") |
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
func checkReuseaddr(fd uintptr) (bool, error) { |
| 39 |
return false, fmt.Errorf("not supported") |
| 40 |
} |