B4J Code Snippet [B4X] Websockets Client Connect and Reconnect - aminoacid    Dec 03, 2022 Based on Erel's MQTT ConnctAndReconnet Sub: - This sub will attenpt to maintain a constant websockets connection. Set working=True and call the sub ONCE in your program: Sub ws_ConnectAndReconnect ws.Initialize("ws") Do While working If ws.Connected Then ws.Close ws.Conne B4J Question Automatic Reconnecting WebSocket-Event fires multiple times - Erel (first post)    Jan 07, 2021   (1 reaction) This is not the use case that is solved by "reconnecting WebSocket". You need to disconnect the client without stopping the server.
When you stop the server you are clearing the sessions so each reconnection will be treated as a new connection. B4J Tutorial [server] Automatic Reconnecting WebSocket - Erel    Jan 06, 2016   (12 reactions) When working with WebSocket handlers the client maintains an online connection. The connection is expected to be kept alive for as long as needed.
However there are cases where the connection can be temporary broken. Especially when the client is a mobile browser.
Using the Reconnecting-WebSocket B4J Question reconnecting websocket - mauro vicamini    Feb 18, 2020 Hi Everyone,
is it possible that a reconnecting websocket (reconnecting-websocket.js) should try to reconnect without that server application hasn't catch a disconnection and without the server could have close the websocket connection? Could exist some kind of connection interruption that is not ca B4J Question Websocket_Disconnected issue - OliverA (first post)    Apr 09, 2019   (1 reaction) Even though WebSockets are persistent, they are not super-persistent. Network drops/disruptions should disconnect a WebSocket connection. Since you are using ABMaterial, ABMaterial compensates for this disconnection and will re-establish an previously connected session (via cookies, using something B4A Example B4Xgoodies_from_walt61 Online - AnandGupta (first post)    Nov 01, 2022   (3 reactions) B4X
WebSocket
Websockets Client Connect and Reconnect
Websockets Client Connect and Reconnect
https://www.b4x.com/android/forum/threads/b4x-websockets-client-connect-and-reconnect.143855/
B4A
Bluetooth
OBD2 Bluetooth
App uses OBD2 Bluetooth plug, it has ELM327 V2.1 IC that connects to all OBDII B4A Question WebView and Websockets - juventino883 (first post)    Mar 31, 2022 Hi @teddybear, I have also tested the loading of my webapp and doing some debugging and yes apparently websockets work with webview, and when the connection is killed either by android or because of bad signal, the webscoket is automatically reconnected, but the variables and maps are lost, so what B4J Question [SOLVED] - Standalonepackage - JServer - alwaysbusy (first post)    Dec 06, 2024 I kind of remember this was indeed needed back in the day with an older version of Jetty and Safari, but checking the code of our WebApps we currently don't seem to do it any more either.
We do get in our logs also occasionally such a message (java.lang.RuntimeException: Object should first be init B4J Question WebApp - Reconnecting websocket thread - still valid? - hatzisn (first post)    Nov 15, 2022 Hi Don Manfred,
It was false alarm. It works. I was getting in the logs a onWebsocketError: null and I though it was a mistake. It is not the case as it works perfectly and it reconnects successfully. Obviously it is the detection. B4J Question Reconnect websockets - wl (first post)    May 01, 2019 Thanks, but I could not create a 100% failsafe solution.
Instead I poll the server now every few minutes and launch a websocket each time in between. So if the websocket drops, a new one will be reconnected after this interval. Page: 1   2   3   4   5   6   7   Powered by ColBERT |