github.com/Uhtred009/v2ray-core-1@v4.31.2+incompatible/transport/internet/sockopt.go (about) 1 package internet 2 3 func isTCPSocket(network string) bool { 4 switch network { 5 case "tcp", "tcp4", "tcp6": 6 return true 7 default: 8 return false 9 } 10 } 11 12 func isUDPSocket(network string) bool { 13 switch network { 14 case "udp", "udp4", "udp6": 15 return true 16 default: 17 return false 18 } 19 }