public static int findAvailableUdpPort(int minPort, int maxPort) {
        return SocketType.UDP.findAvailablePort(minPort, maxPort);
    }
Find an available UDP port randomly selected from the range [{@code minPort}, {@code maxPort}].

@param minPort the minimum port number
@param maxPort the maximum port number
@return an available UDP port number
@throws IllegalStateException if no available port could be found
grpc-common-spring-boot/src/main/java/net/devh/boot/grpc/common/util/SocketUtils.java