事件:'connectionAttempt'
\Event: 'connectionAttempt'
新增于: v21.6.0, v20.12.0
-
ip<string> 套接字尝试连接的 IP。\
ip<string> The IP which the socket is attempting to connect to. -
port<number> 套接字尝试连接的端口。\
port<number> The port which the socket is attempting to connect to. -
family<number> IP 家族。对于 IPv6 可以是6,对于 IPv4 可以是4。\
family<number> The family of the IP. It can be6for IPv6 or4for IPv4.
当开始新的连接尝试时触发。如果在 socket.connect(options) 中启用了系列自动选择算法,则可能会多次触发此消息。
\Emitted when a new connection attempt is started. This may be emitted multiple times
if the family autoselection algorithm is enabled in socket.connect(options).