Hello guys!! New one here. I hava a problem with my code.
Here 's the server code
and here is the client's
So i make a server who waits for connections.When a client connects, if we(the server) send the command showinfo, it responds with some system information.The problem is that it is a multithreaded server and many clients connect.So if for example connect 2 clients at the server we have to type 2 times showinfo and then the clients give us the information. How can i make the clients respond immediately with typing showinfo for each one and don't wait until i type showinfo for all the clients. It's a bit tiring to type 50 times showinfo if there are 50 clients before you can execute your command. Thank you in advance (i have tried some thread synchronization and some sleep() join() commands but i haven't reach a conclusion i hope you can help a bit.)