I am trying to make a multiplayer game where many calculations are done on the server with multiple clients. How could I have my server listen for new clients, while calculating for the game. Everything I have tried pauses the entire program while it runs ServerSocket.accept(). Is there any way around this? Thanks in advance.
Share
Either the game loop or
ServerSocket.accept()should be handled in its ownThread, while the other runs in the main thread.