FedP2P/listen.go

12 lines
172 B
Go
Raw Normal View History

package torrent
2018-04-12 13:21:31 +08:00
import "strings"
func LoopbackListenHost(network string) string {
if strings.Contains(network, "4") {
return "127.0.0.1"
} else {
return "::1"
}
}