【问题标题】:Diffusion reconnect timeout扩散重新连接超时
【发布时间】:2016-04-06 16:20:40
【问题描述】:

我正在使用 Diffusion v5.6.6 创建一个移动应用程序,重要的是当客户端失去移动连接时应用程序恢复,然后稍后再次获得连接。我可以在 Connectors.xml 中看到与此相关的两个设置:

<!-- This is the idle time (no inbound messages) before a
     client will be pinged by the server. A response must
     be received by Diffusion before the next interval,
     else the client is considered to be disconnected. -->
<system-ping-frequency>90s</system-ping-frequency>

<reconnect>
   <!-- This is the amount of milliseconds a session
        will be kept alive after a sudden connection loss. -->
   <keep-alive>60000</keep-alive>
</reconnect>

这个 90 秒的 ping 和 60 秒的保活有什么区别?

【问题讨论】:

    标签: push-diffusion


    【解决方案1】:

    来自the relevant page of the Diffusion manual

    关于 60 秒保活;当客户端失去连接时,它会进入重新连接状态,其中 会话在服务器上持续存在,直到客户端重新连接或 达到保持活动时间并且会话被破坏。留言 客户端在重新连接状态时仍在排队。

    关于 90 秒 ping; system-ping-frequency 指定服务器的频率 将ping客户端。这用于检测客户端已断开连接并且 如果在到期前没有收到客户端的响应 假定客户端断开连接的另一个间隔时间段。如果 值设置为 0 客户端未 ping。

    【讨论】:

      猜你喜欢
      • 2014-03-18
      • 2014-09-24
      • 2014-12-12
      • 1970-01-01
      • 2013-07-07
      • 1970-01-01
      • 2013-12-31
      • 1970-01-01
      相关资源
      最近更新 更多