Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
SMHService.dnsFetch = QCloudHttpClient.QCloudDnsFetch { hostname ->//Get the IP list corresponding to the hostname//return corresponding InetAddress listreturn inetAddressList;}}
SMHService.dnsFetch = QCloudHttpClient.QCloudDnsFetch { hostname ->val ips = MSDKDnsResolver.getInstance().getAddrByName(hostname)val ipArr = ips.split(";")if (ipArr.isEmpty()) {emptyList<InetAddress>()} else {val inetAddressList: MutableList<InetAddress> = ArrayList(ipArr.size)for (ip in ipArr) {if ("0" == ip) {continue}try {val inetAddress = InetAddress.getByName(ip)inetAddressList.add(inetAddress)} catch (ignored: UnknownHostException) {}}inetAddressList}}
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan