title: TCP server/client connection issue C#
body: <p>so I am currently programming a simple server/client to play some basic games i did in the past.</p>
  
  <p>The problem is that I can only connect while I'm on the same computer, and not via LAN (as I would want it to work), here's the code I'm working with:</p>
  
  <p>Server:<br>
  <code>IPEndPoint Ep = new IPEndPoint(IPAddress.Any, 8000);
              listener = new TcpListener(Ep);
              listener.Start();</code></p>
  
  <p>Client:<br>
  <code>IPAddress direc = IPAddress.Parse(ipManager);
              Ep = new IPEndPoint(direc, 8000);</code></p>
  
  <p>The problem is that when I try connect from another computer (connected to the same Wi-Fi obviously) I get the following error: </p>
  
  <blockquote>
    <p>A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.0.5:8000</p>
  </blockquote>
  
  <p>I shuold also add that this is the code when I try to connect:</p>
  
  <p>Sever:<br>
  <code>TcpClient client = listener.AcceptTcpClient();</code></p>
  
  <p>Client:<br>
  <code>client.Connect(Ep);</code></p>
  
  <p>Apparently when I am connecting the server never "accepts" the connection, but I haven't been able to figure out why's that.</p>