事件:'connectionAttemptFailed'
¥Event: 'connectionAttemptFailed'
-
ip
<string> 套接字尝试连接的 IP。¥
ip
<string> The IP which the socket attempted to connect to. -
port
<number> 套接字尝试连接的端口。¥
port
<number> The port which the socket attempted to connect to. -
family
<number> IP 家族。对于 IPv6 可以是6
,对于 IPv4 可以是4
。¥
family
<number> The family of the IP. It can be6
for IPv6 or4
for IPv4. -
error
<Error> 与失败相关的错误。¥
error
<Error> The error associated with the failure.
连接尝试失败时触发。如果在 socket.connect(options)
中启用了系列自动选择算法,则可能会多次触发此消息。
¥Emitted when a connection attempt failed. This may be emitted multiple times
if the family autoselection algorithm is enabled in socket.connect(options)
.