- Notifications
You must be signed in to change notification settings - Fork611
Monitoring Heartbeat with uWebSockets.js and socket.io Integration and Updating Device Status#1129
-
I am using this approach to integrate socket.io with uWebSockets.js. How can I monitor the heartbeat? The header of my connection includes a deviceid, and I want to update the deviceid with a Unix timestamp in Redis every heartbeat. The reason for implementing it this way is to determine whether these devices are currently online or, after killing socket.io, if these machines haven't reconnected, I could deduce they are offline by checking the expiration time along with the Unix timestamp. However, I am not able to catch the heartbeat. |
BetaWas this translation helpful?Give feedback.
All reactions
By default uWS guarantees that open/close callbacks are reliable. So you just trust them. No need to track heartbeats.
Replies: 3 comments
-
By default uWS guarantees that open/close callbacks are reliable. So you just trust them. No need to track heartbeats. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I am using socket.io, which encapsulates websocket.js. However, I want to capture the last heartbeat and store it. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
is it normal that device goes offline on 12:20:58 and ONLINE on 12:21:48. it's contiously going online and offline ...
|
BetaWas this translation helpful?Give feedback.