扩散重新连接超时
Diffusion reconnect timeout
我正在使用 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秒的keep alive有什么区别?
来自the relevant page of the Diffusion manual:
关于60秒keep alive;当客户端失去连接时,它会进入重新连接状态
会话在服务器上持续存在,直到客户端重新连接或
达到保持活动时间并销毁会话。留言给
客户端在重新连接状态下仍在排队。
关于 90 秒 ping; system-ping-frequency
指定服务器的频率
将 ping 客户端。这用于检测客户端已断开连接并且
如果在到期之前没有收到客户的回复
假定客户端已断开连接的另一个间隔时间。如果
值设置为 0 客户端不会被 ping。
我正在使用 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秒的keep alive有什么区别?
来自the relevant page of the Diffusion manual:
关于60秒keep alive;当客户端失去连接时,它会进入重新连接状态 会话在服务器上持续存在,直到客户端重新连接或 达到保持活动时间并销毁会话。留言给 客户端在重新连接状态下仍在排队。
关于 90 秒 ping; system-ping-frequency
指定服务器的频率
将 ping 客户端。这用于检测客户端已断开连接并且
如果在到期之前没有收到客户的回复
假定客户端已断开连接的另一个间隔时间。如果
值设置为 0 客户端不会被 ping。