socket.io-rpc
socket.io-rpc copied to clipboard
How to handle disconnects
There is no way to detect when the server has forcibly closed the connection with socket.disconnect().
Are there any methods for connection management, or is it designed to stay connected for the entire lifetime of the browser application?
it is designed to stay connected for the entire lifetime. If you need to know that the server ended the connection, maybe you could send some special end message to the client before disconnecting him.
I would like to display an indicator in the user interface if the connection is not presently available. Without some sort of connect/disconnect notification this is not possible. As a related issue, is there a way to have RPC calls timeout if the server doesn't respond (for whatever reason) within X time?