github.com/imannamdari/v2ray-core/v5@v5.0.5/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  }