title: Is there a way that server know the connecting client's hostname?
body: <p>Client is given a server's hostname, so that client can connect to the server with the given hostname. </p>
  
  <pre><code>//client side
  host = new InetSocketAddress ( args[0], 50000); // args[0] = server's address
  sockfd = new Socket(host.getHostName(),host.getPort());
  
  
  
  //server side
  sockfd = new ServerSocket(50000);
  Socket clientfd= sockfd.accept ();
  </code></pre>
  
  <p>When client connects to the <code>server A</code> like above, is there a way for <code>server A</code> to know the client's hostname?
  Because <code>server A</code> has to tell the other <code>server B</code> to give that client some messages.</p>
  
  <p>If there isn't, how should connected <code>server A</code> notify the <code>server B</code> about connecting to the client?</p>
  
  <p>Client also has <code>ServerSocket</code> which can receive connection from <code>server B</code></p>