V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Just1n
V2EX  ›  Node.js

socket.io的connect_failed问题

  •  
  •   Just1n · Feb 10, 2012 · 5056 views
    This topic created in 5190 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
        1
    Just1n  
    OP
       Feb 10, 2012
    代码不是这么贴的么?
    yyfearth
        2
    yyfearth  
       Feb 10, 2012
    yyfearth
        3
    yyfearth  
       Feb 10, 2012
    报告LZ,贴dist貌似要把https改成http
    yyfearth
        4
    yyfearth  
       Feb 10, 2012
    typo,贴gist貌似要把https改成http
    Just1n
        5
    Just1n  
    OP
       Feb 10, 2012
    额。我是在这个地址: https://study.congcong.us/t/24568 里@Livid 回帖说是要加https的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   972 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 191ms · UTC 20:30 · PVG 04:30 · LAX 13:30 · JFK 16:30
    ♥ Do have faith in what you're doing.