M mauro vicamini Active Member Licensed User Longtime User Jan 21, 2020 #1 Hi everyone! I'd like to know how to detect a websocket disconnection (due to server fault or line ) in a javascript client that use b4j_ws.js and reconnecting-websocket.js, but at the same time it doesn't confuse a clear close recived from the server with an accidental disconnection. Thanks for the attention.
Hi everyone! I'd like to know how to detect a websocket disconnection (due to server fault or line ) in a javascript client that use b4j_ws.js and reconnecting-websocket.js, but at the same time it doesn't confuse a clear close recived from the server with an accidental disconnection. Thanks for the attention.
Erel B4X founder Staff member Licensed User Longtime User Jan 22, 2020 #2 1. Check the browser console messages. 2. Check the source code of reconneting-websocket.js and b4j_ws. You need to handle the b4j_ws.onconnecting event. This will be raised when the client tries to reconnect. Upvote 0
1. Check the browser console messages. 2. Check the source code of reconneting-websocket.js and b4j_ws. You need to handle the b4j_ws.onconnecting event. This will be raised when the client tries to reconnect.