I Am trying to code a java program with sockets in which i have 3 system(1 server and two clients) both the clients connect to the server at the same port.Its a file transfer program.
Now my requirement is that both the connection would remain active throughout and as soon as client1 writes to its socket connection on the server the server relays that data to the socket between server and client2.
How can i achieve this?