Commit Graph

3 Commits

Author SHA1 Message Date
cce0aa8162 Handle reconnection
reconnection works now if the rejoining player enters the passphrase
again.

Some bugs are still happening:
1. The rejoining client is not told the state of the board
2. Invalid moves are not handled by the client (not sure why though)
3. The still-connected client should be told, that the opponent
   disconnected. Then the client should show the passphrase again
2023-11-27 00:17:07 +01:00
efefa4ced5 Change websocket handling
With this commit, we stop waiting for the websocket connection to be
established before the game starts.
Now, the Connection type is responsible for waiting for the websocket
connection before writing.
2023-11-26 21:46:53 +01:00
26242424ed Implement thread-safe ringbuffer for websocket messages
This implements a ringbuffer that is used to decouple the raw websocket
connection from the messages that the game handler handles.
2023-11-26 21:37:14 +01:00