does anyone know whats wrong with my code? When I write something with client1 i just see it on the server and on the client1 but not on client2.
run() in Client.j
In your handler:
while((s = reader.readLine()) != null) { writer.write(s + "\n"); writer.flush(); System.out.println(s); }
You are only writing the string back to the sender, not to all connected sockets