Handle Reconnection
Updated at 1705294393000For multi states application like a game, you handle a reconnection to allow use comeback to the state before user disconnected.
Flow
You can have a reconnect flow like that:
- After an user access app, you don't send a game logic command from client, you will send a reconnect command instead like this one
- On server you will check state of the user and response the reconnect data like this one
- Then on client you can process reconnect command response data and decide to reconnect the user to the current game or create new one like this one.