Amruta Jegarkal wrote:
I have written code for 1 client and server communication,its working fine.......For multi client i just used multithreading concept by extending Thread and overriding run but what next im not getting........
What next depends on what you need to do. To send the message to all other clients, you need to:
- Loop over all other clients
- for each client, check to see if it is not the same one who sent the message
- if the client did not send the message to the server, send the message to client.
To send the message to just one other client:
- Identify the client to send to
- Get that client
- Send the message to that client