Currently, I'm experiencing issues with slow disconnection detection in the SocketIOClient library. While the JavaScript Socket.IO client provides options like pingTimeout and pingInterval to configure how quickly connection loss is detected, these options seem to be missing in the C# implementation.
The ConnectionTimeout option only affects the initial connection and WebSocket upgrade, but not the ongoing connection monitoring. In our real-time application, we need to detect connection loss within 5-10 seconds, but currently it can take much longer.
Questions:
- Is there a built-in way to configure ping/pong timeout detection that I'm missing?
- Are there plans to implement
pingTimeout and pingInterval options similar to the JavaScript client?
- If not, what would be the recommended approach to implement quick disconnection detection without manually tracking ping/pong timestamps?
Current workaround:
We're currently tracking the last ping/pong time manually and force-closing the socket if no ping is received within N seconds, but this feels like something that should be handled by the library itself.
Environment:
- SocketIOClient version: 3.1.2
- Unity/C# application
Currently, I'm experiencing issues with slow disconnection detection in the SocketIOClient library. While the JavaScript Socket.IO client provides options like
pingTimeoutandpingIntervalto configure how quickly connection loss is detected, these options seem to be missing in the C# implementation.The
ConnectionTimeoutoption only affects the initial connection and WebSocket upgrade, but not the ongoing connection monitoring. In our real-time application, we need to detect connection loss within 5-10 seconds, but currently it can take much longer.Questions:
pingTimeoutandpingIntervaloptions similar to the JavaScript client?Current workaround:
We're currently tracking the last ping/pong time manually and force-closing the socket if no ping is received within N seconds, but this feels like something that should be handled by the library itself.
Environment: