title: How Socket Handles more than one simultaneous client requests?
body: <p>I have very basic doubt in Socket programming (somewhat related to networking as well).
  I have ServerSocket something like..</p>
  
  <pre><code> ServerSocket ss = new ServerSocket(1234);
  </code></pre>
  
  <p>and I have Socket called incomingLink to handle incoming request..</p>
  
  <pre><code> Socket incomingLink = ss.accept();
  </code></pre>
  
  <p>And note that there are more than 1 client(say 3 clients) having their outgoingLink Socket something like..</p>
  
  <pre><code> Socket outgoingLink = new Socket(ServerIp, 1234);
  </code></pre>
  
  <p>Well, The requirement is that server has some local parameters (say) </p>
  
  <pre><code> String state;
   int timeStamp;
  </code></pre>
  
  <p>which should be updated whenever first client request is arrived. And subsequent requests are discarded. That means if client-1's request is received first, then client-2 and 3's request will be discarded.</p>
  
  <p>Now my question is if all the three client sends their request at exactly the same time, so how my ServerSocket will handle those request ?
  Do I need to create an array of socket to handle these three request independently like this ?</p>
  
  <pre><code> Socket[] incomingLink = new Socket[3];
   incomingLink[0] = ss.accept();
   incomingLink[1] = ss.accept();
   incomingLink[2] = ss.accept(); 
  </code></pre>
  
  <p>Or else if I use a single incomingLink socket, Will the underlying transport protocol(TCP/UDP) do the work for me to handle these simultaneous requests by buffering them to buffer, and maintaining a proper order and then supply them one after another to my ServerSocket, so that my single incomingLink Socket will handle them properly ?
  (Assuming that variation in propagation delays of these three request can be there even if these are sent at the same time).</p>
  
  <p>Please help. Thanks.</p>