FedP2P/listen.go

12 lines
179 B
Go

package torrent
import "strings"
func LoopbackListenHost(network string) string {
if strings.IndexByte(network, '4') != -1 {
return "127.0.0.1"
} else {
return "::1"
}
}