title: No such host is known in GetAddrInfo c# sockets
body: <p>I am trying to establish a server-client connection using sockets in c#. I am trying to establish the connection firstly from the same machine and in the second step from different computers. I came accross those posts for <a href="https://msdn.microsoft.com/en-us/library/fx6588te(v=vs.110).aspx" rel="nofollow">server</a> and <a href="https://msdn.microsoft.com/en-us/library/bew39x2a(v=vs.110).aspx" rel="nofollow">client</a>. My question is about client connection. I am trying to perform something like: </p>
  
  <pre><code> private static void StartClient()
   {
      try
      {
       //IPHostEntry ipHostInfo = Dns.GetHostEntry(Dns.GetHostName());
       IPHostEntry ipHostInfo = Dns.GetHostEntry("127.0.0.1:11000");
       IPAddress ipAddress = ipHostInfo.AddressList[0];
       IPEndPoint remoteEP = new IPEndPoint(ipAddress, port);
  
       // Create a TCP/IP socket.
       Socket client = new Socket(ipAddress.AddressFamily,
       SocketType.Stream, ProtocolType.Tcp);
       .......
     }
  </code></pre>
  
  <p>However I am getting the message:</p>
  
  <blockquote>
    <p>NO such host is known at System.NEt.Dns.GetAddrInfo </p>
  </blockquote>
  
  <p>What is my issue here? Port 11000 is the same I am using from server. What should I add as hostEntry when I runnin locally and what when I am running client from other machine?</p>
  
  <p><strong>EDIT:</strong> When I change the line <code>Dns.GetHostEntry("127.0.0.1:11000");</code> to <code>Dns.GetHostEntry("127.0.0.1");</code> or <code>Dns.GetHostEntry("serverIp");</code> I got the same message.</p>
  
  <p><strong>EDIT2:</strong> When I gave the ip of the machine everything worked properly. Is it possible to send a message from server to clinets?</p>