title: Is it possible to bind and listen to one IP address with TCP/IP sockets? (Linux/C)
body: <p>I have always used:</p>
  
  <pre><code>serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
  </code></pre>
  
  <p>which means that I will accept connections from any interface. If I replace the INADDR_ANY with “192.168.0.1”. Does this mean I will only accept connections from the IP address of 192.168.0.1, or does it mean I will accept connections from the interface of 192.168.0.1 resides on?</p>
  
  <p>I have a situation now where I have multiple clients (each with a unique IP address but same port number), trying to connect to one server. Can I have multiple listens functions (separate threads) listening to a unique IP address and port? Or do I have to accept any connection and get the network information after I've connected?</p>
  
  <hr>
  
  <p>Edit To give more clarification.</p>
  
  <p>If I say serv_addr.sin_addr.s_addr = inet_addr("192.168.0.1") and a client with IP address 192.168.0.2 tries to connect, will the listen command reject this? </p>