dnsPromises.resolveSrv(hostname)


使用域名系统协议解析 hostname 的服务记录(SRV 记录)。当成功时,Promise 使用具有以下属性的对象数组进行解决:

¥Uses the DNS protocol to resolve service records (SRV records) for the hostname. On success, the Promise is resolved with an array of objects with the following properties:

  • priority

  • weight

  • port

  • name

{
  priority: 10,
  weight: 5,
  port: 21223,
  name: 'service.example.com'
}