title: Cannot retrieve hostname calling my TCPListener Service
body: <p>I am writing a simple FTP service using TcpListener and would like to find out what hostname (domain with multiple subdomains) the incoming call is using.</p>
  
  <p>Is this possible?</p>
  
  <pre><code>//Barebone TCPListener example
  System.Net.Sockets.TcpListener listener;
  listener = new TcpListener(IPAddress.Any, 21)
  
  listener.Start();
  
  TcpClient client = listener.AcceptTcpClient();
  
  //Great, incoming... what domain are they using to call my service?
  
  //This only gives me the local and remote IP..
  //IPEndPoint LocalEndPoint = (IPEndPoint)client.Client.LocalEndPoint;
  //IPEndPoint RemoteEndPoint = (IPEndPoint)client.Client.RemoteEndPoint;
  </code></pre>
  
  <p>Any pointers greatly appreciated.</p>