2
0
mirror of synced 2025-02-23 06:08:07 +00:00
torrent/listen.go

12 lines
179 B
Go
Raw Normal View History

package torrent
2018-04-12 15:21:31 +10:00
import "strings"
func LoopbackListenHost(network string) string {
2021-09-14 06:54:37 -05:00
if strings.IndexByte(network, '4') != -1 {
2018-04-12 15:21:31 +10:00
return "127.0.0.1"
} else {
return "::1"
}
}