title: different client from different pc communicate with server using ip in java
body: <p>I am using <code>java.nio package</code> for my chat application. However, it can only connect different clients in the localhost only. How can I connect multiple clients from different IP addresses? </p>
  
  <p>Currently I am connecting to my client using the following code:</p>
  
  <pre><code>InetAddress.getByName("10.10.10.172");
  </code></pre>
  
  <p>I would like to be able to send messages from a client that has an IP address of 10.10.10.123 to a server which has an IP address of 10.10.10.124.</p>
  
  <p>Thanks!</p>