V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Just1n
V2EX  ›  Node.js

socket.io的connect_failed问题

  •  
  •   Just1n · 2012-02-10 14:27:59 +08:00 · 4241 次点击
    这是一个创建于 4449 天前的主题,其中的信息可能已经有所发展或是发生改变。
    如果我的客户端尝试连接一个不存在的服务端,那么就应该触发connect_failed这个事件。

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

    客户端代码如下:

    https://gist.github.com/1787179
    5 条回复    1970-01-01 08:00:00 +08:00
    Just1n
        1
    Just1n  
    OP
       2012-02-10 14:37:24 +08:00
    代码不是这么贴的么?
    yyfearth
        2
    yyfearth  
       2012-02-10 14:39:25 +08:00
    yyfearth
        3
    yyfearth  
       2012-02-10 14:39:53 +08:00
    报告LZ,贴dist貌似要把https改成http
    yyfearth
        4
    yyfearth  
       2012-02-10 14:40:47 +08:00
    typo,贴gist貌似要把https改成http
    Just1n
        5
    Just1n  
    OP
       2012-02-10 15:10:39 +08:00
    额。我是在这个地址: http://www.v2ex.com/t/24568 里@Livid 回帖说是要加https的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   958 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 21:28 · PVG 05:28 · LAX 14:28 · JFK 17:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.