dns.resolveSrv(hostname, callback)
hostname
<string>callback
<Function>err
<Error>addresses
<Object[]>
使用域名系统协议解析 hostname
的服务记录(SRV
记录)。
传给 callback
函数的 addresses
参数将是具有以下属性的对象数组:
priority
weight
port
name
{
priority: 10,
weight: 5,
port: 21223,
name: 'service.example.com'
}
hostname
<string>callback
<Function>err
<Error>addresses
<Object[]>
Uses the DNS protocol to resolve service records (SRV
records) for the
hostname
. The addresses
argument passed to the callback
function will
be an array of objects with the following properties:
priority
weight
port
name
{
priority: 10,
weight: 5,
port: 21223,
name: 'service.example.com'
}