mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-09 00:23:01 +00:00
20 lines
281 B
Go
20 lines
281 B
Go
|
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
|
||
|
}
|
||
|
}
|