title: How the clients (client sockets) are identified?
body: <p>To my understanding by <code>serverSocket = new ServerSocket(portNumber)</code> we create an object which potentially can "listen" to the indicated port. By <code>clientSocket = serverSocket.accept()</code> we force the server socket to "listen" to its port and to "accept" a connection from any client which tries to connect to the server through the port associated with the server. When I say "client tries to connect to the server" I mean that client program executes "nameSocket = new Socket(serverIP,serverPort)".</p>
  
  <p>If client is trying to connect to the server, the server "accepts" this client (i.e. creates a "client socket" associated with this client).</p>
  
  <p>If a new client tries to connect to the server, the server creates another client socket (associated with the new client). But how the server knows if it is a "new" client or an "old" one which has already its socket? Or, in other words, how the clients are identified? By their IP? By their IP and port? By some "signatures"?</p>
  
  <p>What happens if an "old" client tries to use Socket(serverIP,serverIP) again? Will server create the second socket associated with this client?</p>