LPeJuN6lLsS9
V2EX  ›  问与答

TCP 半开连接要过多久才会被发现

  •  
  •   LPeJuN6lLsS9 · Jun 28, 2016 · 2291 views
    This topic created in 3795 days ago, the information mentioned may be changed or developed.
    只是为了清理连接占有的资源的话是不是慢慢等就可以了?我等了几小时也没动静,没耐心了(半开指的是维基百科的第一种定义)
    4 replies  •  2016-06-29 08:57:02 +08:00
    ihuotui
    ihuotui
    Jun 28, 2016
    1
    建议详细看一下 tcp 的资料
    ryd994
    ryd994
    Jun 28, 2016 via Android
    2
    理论上如果双方没有数据交换,而且也没有 keepalive 的话………我觉得是永远
    LPeJuN6lLsS9
    LPeJuN6lLsS9
    OP
    Jun 29, 2016
    3
    @ryd994 keep-alive 是指应用层心跳而不是 TCP 的那个功能吧?

    我强迫症不想用心跳,就为了节省一丁点流量,哪怕等一天也没事
    LPeJuN6lLsS9
    LPeJuN6lLsS9
    OP
    Jun 29, 2016
    4
    后悔问这问题了,研究了一下发现 openssh 和 mysql 都用了 keep-alive ( tcp 的),我也乖乖来一个好了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2366 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 12:59 · PVG 20:59 · LAX 04:59 · JFK 07:59
    ♥ Do have faith in what you're doing.