事件:'connectionAttemptTimeout'


【Event: 'connectionAttemptTimeout'

  • ip <string> 套接字尝试连接的 IP。
  • port <number> 套接字尝试连接的端口。
  • family <number> IP 的类型。可以是 6 表示 IPv6 或 4 表示 IPv4。

当连接尝试超时时发出。仅当 socket.connect(options) 中启用了地址族自动选择算法时才会发出(并且可能会发出多次)。

【Emitted when a connection attempt timed out. This is only emitted (and may be emitted multiple times) if the family autoselection algorithm is enabled in socket.connect(options).】