title: How to identify clients from a pool of clients in the server - Design
body: <p>Okay, so I have a client/server library that I'm working. The server can accept multiple connections from clients. At every call to Accept(), if successful, the handle to the client's socket is pushed to a map, with a supposed unique ID as a key. So that when the server want to send a message to a specific client later on, it will find the client using this ID. </p>
  
  <p>My question: What can be the unique ID for every client? IP address is not posssible as multiple clients can come from the same IP address. If not, can anyone suggest some other good design. Thanks</p>
  
  <p>Illustration:</p>
  
  <pre><code>ClientSocket workerSock = Server.Accept();
  
  Map.Add(workerSock);
  
         Map
  ____________________
  |Key   | Value     |
  |------------------|
  | ?    |workerSock1| ------------------------ client application 1
  |------------------|
  | ?    |workerSock2| ------------------------ client application 2
  |------------------|
  | ?    |workerSock3| ------------------------ client application 3
  --------------------
  </code></pre>
  
  <p>Scenario: Server wants to send to a specific client, so it has to have some ID. </p>