W wl Well-Known Member Licensed User Longtime User Nov 7, 2015 #1 Hi, I'm trying to implement a heartbeat in my B4J webpage that reconnects to the server in case the heartbeat fails (and thus the connection was lost meanwhile). Does anyone have an example on how to this ? b4j_onclose ... b4j_connect ... Can't fit the puzzle Thanks !
Hi, I'm trying to implement a heartbeat in my B4J webpage that reconnects to the server in case the heartbeat fails (and thus the connection was lost meanwhile). Does anyone have an example on how to this ? b4j_onclose ... b4j_connect ... Can't fit the puzzle Thanks !
R Roycefer Well-Known Member Licensed User Longtime User Nov 7, 2015 #2 Have your JavaScript perform the heartbeat and have your server respond to the heartbeat so that your JavaScript knows it worked. If it fails to get a response after a certain amount of time, call Code: b4j_connect("/WSHandler") again. Upvote 0
Have your JavaScript perform the heartbeat and have your server respond to the heartbeat so that your JavaScript knows it worked. If it fails to get a response after a certain amount of time, call Code: b4j_connect("/WSHandler") again.