Closed alexwohlbruck closed 2 years ago
The websocket server times out after about 30 seconds of inactivity. In order to prevent this, the server must sing a ping every few (maybe 5) seconds and the client responds with a pong as soon as it is received.
https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#pings_and_pongs_the_heartbeat_of_websockets https://stackoverflow.com/questions/50876766/how-to-implement-ping-pong-request-for-websocket-connection-alive-in-javascript
The websocket server times out after about 30 seconds of inactivity. In order to prevent this, the server must sing a ping every few (maybe 5) seconds and the client responds with a pong as soon as it is received.
https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#pings_and_pongs_the_heartbeat_of_websockets https://stackoverflow.com/questions/50876766/how-to-implement-ping-pong-request-for-websocket-connection-alive-in-javascript