Handle Reconnection

Updated at 1705294393000
For 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:
  1. 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](https://github.com/tvd12/space-shooter/blob/master/unity/Assets/Done/Scripts/SocketClientProxy.cs#L65)
  2. On server you will check state of the user and response the reconnect data like this one
  3. 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.

Table Of Contents