new net.SocketAddress([options])
新增于: v15.14.0
options
<Object>
address
<string> 作为 IPv4 或 IPv6 字符串的网络地址。
默认值: 如果 family
为 'ipv4'
,则为 '127.0.0.1'
;如果 family
是 'ipv6'
,则为 '::'
。
family
<string> 'ipv4'
或 'ipv6'
之一。
默认值: 'ipv4'
.
flowlabel
<number> 仅当 family
为 'ipv6'
时才使用的 IPv6 流标签。
port
<number> IP 端口。
Added in: v15.14.0
options
<Object>
address
<string> The network address as either an IPv4 or IPv6 string.
Default: '127.0.0.1'
if family
is 'ipv4'
; '::'
if family
is
'ipv6'
.
family
<string> One of either 'ipv4'
or 'ipv6'
.
Default: 'ipv4'
.
flowlabel
<number> An IPv6 flow-label used only if family
is 'ipv6'
.
port
<number> An IP port.