So the game will stop and wait for the socket infomation to gather.
If the connected socket dont send any data the server will wait forever and dont run any game.
one solusion for this is multi threaded server impl. This is one way todo it.
the other solusion is to make the frontend the captain and if the frontend tells the backend to run one game then the backend will do that and after the game is done be ready to rescive new data.
I think the multi threaded way is better because it gives us more freedom and we can cancel and run what ever from the frontend, and get what ever data we wont even if a game is allready running.
So the game will stop and wait for the socket infomation to gather.
If the connected socket dont send any data the server will wait forever and dont run any game.
one solusion for this is multi threaded server impl. This is one way todo it.
the other solusion is to make the frontend the captain and if the frontend tells the backend to run one game then the backend will do that and after the game is done be ready to rescive new data.
I think the multi threaded way is better because it gives us more freedom and we can cancel and run what ever from the frontend, and get what ever data we wont even if a game is allready running.