Gujiawei-Edinburgh commented on issue #212:
URL: https://github.com/apache/bifromq/issues/212#issuecomment-3760627687
> 希望应用端可以获取到 设备的 在线 和离线状态 1、场景:应用程序有可能需要停止服务,导致 没有收到 event 事件,会导致 设备状态 错误
2、想法:希望可以获取到 设备端发送的 心跳包,和心跳发生时间间隔,辅助判断设备在线状态,比如 设备端 每 60 s 发生一次心态包
,如果接收到心态包,设备为在线状态 ,如果 超过 规定时间,则为 离线状态。
1. If you want to receive **PING events**, there is a `PingReq` event in the
system.
This event is **only enabled when `debugMode` is set to `true`** (it is
`false` by default).
You can enable it via your custom `SettingProvider`.
2. For **Keep Alive**, the value is available in the `ClientConnected` event
as
`keepAliveTimeSeconds`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]