mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-09-17 20:31:10 +02:00
d2ea21d0d8
* use certmagic for more extensible/robust ACME cert handling * accept TOS based on config option Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
24 lines
485 B
Go
Vendored
24 lines
485 B
Go
Vendored
// +build !go1.11 !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd
|
|
|
|
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)
|
|
}
|