Hi I have a very simple client-server program that uses sockets simulating a simple atm. In the client part of the program, I have a gui class and another thread for communication with the server, so that gui and logic are separated, and gui does not freeze, waiting for a thread to communicate with the server.
I create one thread, as the client socket is created on connection and lives through the entire session. And the problem is that I have a loop loop in an infinite loop and a gui request if the user presses any key so that he can take care of the action.
Any suggestions for best practice on this? I do not want to use RMI, as I am developing for educational reasons.
Greetings
source
share