$connect$disconnect$default
$connect
There are two states that connect can be in. First time connect and reconnecting. Other info is that each time a user connects to the web socket server, even if they are returning, they are issued with a new connection ID. This connection ID can be read fromevent.requestContext.connectionId.
First Time Connecting
If this is the first time that a player is connecting to the web socket server. You will need to save their connection ID in the connections table, see here.Reconnecting
If for whatever reason, a user is disconnected, they should be given an oppotunity to reconnect. We may need to create an additional route that is called if a game and player ID is stored on the frontend to see if it is valid. If it is valid, update the connections table with the updated connection ID. Maybe something like the currently implementedcheck function, where we pass through the player and game ID and see if it exsits in the current connections table.
We also need to keep some stuff persistent, especially like what current stage of the game we are on and if we are in the game loop, what current round we are on.

