1)which java.net class i used to establish connectionjava.net.Socket.
between to client1
2)If suppose client1 want to chat client3,then howNo they don't. Each client is represented by a different Socket and each Socket has its own pair of streams. Where did you get this from?
client1 discriminate that message is coming from
client2 or 3 because both send the message to same