default List<InetSocketAddress> resolve(String host, int port) throws UnknownHostException {
        final InetAddress[] inetAddresses = resolve(host);
        if (inetAddresses == null) {
            return Collections.singletonList(InetSocketAddress.createUnresolved(host, port));
        }
        return Arrays.stream(inetAddresses)
                .map(e -> new InetSocketAddress(e, port))
                .collect(Collectors.toList());
    }
Returns a list of {@link InetSocketAddress} for the given host with the given port.

@see InetSocketAddress

@since 5.5
httpclient5/src/main/java/org/apache/hc/client5/http/DnsResolver.java