Just1n
V2EX  ›  Node.js

socket.io的connect_failed问题

  •  
  •   Just1n · Feb 10, 2012 · 5385 views
    This topic created in 5396 days ago, the information mentioned may be changed or developed.
    如果我的客户端尝试连接一个不存在的服务端,那么就应该触发connect_failed这个事件。

    官方文档上说是要加一个connect timeout的参数。但我加上之后还是没法触发这个事件。

    客户端代码如下:

    https://gist.github.com/1787179
    5 replies  •  1970-01-01 08:00:00 +08:00
    Just1n
    Just1n
    OP
    Feb 10, 2012
    1
    代码不是这么贴的么?
    yyfearth
    yyfearth
    Feb 10, 2012
    3
    报告LZ,贴dist貌似要把https改成http
    yyfearth
    yyfearth
    Feb 10, 2012
    4
    typo,贴gist貌似要把https改成http
    Just1n
    Just1n
    OP
    Feb 10, 2012
    5
    额。我是在这个地址: http://www.v2ex.com/t/24568 里@Livid 回帖说是要加https的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2276 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 13:54 · PVG 21:54 · LAX 05:54 · JFK 08:54
    ♥ Do have faith in what you're doing.