Here\'s my code:
SERVER:
package server; public class Main { public static void main(String args[]) { new EchoServer(9000); } }
You should take a look at multiThreaded chat Server. Each client wich connects gets it's own thread.
Here is the perfect answer to your question:
multithread client-server chat, using sockets
Good luck mate!