SocketAddress.parse(input)


  • input <string> 包含 IP 地址和可选端口的输入字符串,例如 123.1.2.3:1234[1::1]:1234

    ¥input <string> An input string containing an IP address and optional port, e.g. 123.1.2.3:1234 or [1::1]:1234.

  • 返回:<net.SocketAddress> 如果解析成功,则返回 SocketAddress。否则返回 undefined

    ¥Returns: <net.SocketAddress> Returns a SocketAddress if parsing was successful. Otherwise returns undefined.