Xray-core/transport/internet/sockopt.go

20 lines
281 B
Go
Raw Normal View History

2020-11-25 13:01:53 +02:00
package internet
func isTCPSocket(network string) bool {
switch network {
case "tcp", "tcp4", "tcp6":
return true
default:
return false
}
}
func isUDPSocket(network string) bool {
switch network {
case "udp", "udp4", "udp6":
return true
default:
return false
}
}