Author Topic: Unable to connect error  (Read 2477 times)

thenick191

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 25
    • View Profile
Unable to connect error
« on: February 03, 2015, 02:51:27 PM »
If I run a game on my computer then another client on my same machine I can connect both just fine to the locally run game server. However, if I go on another computer on my network and start a client, then try to connect to that client I get an "Unable to connect" error. The firewall is off on both machines. The firewall is also off on my router. Any tips? Do I have to forward ports for every game I start from the router? I really hope there is another way.

thenick191

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: Unable to connect error
« Reply #1 on: February 05, 2015, 10:53:05 AM »
anyone? please?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unable to connect error
« Reply #2 on: February 05, 2015, 01:16:15 PM »
What IP are you using? 127.0.0.1 always points to the machine you're running it on. You need to specify the IP of your other machine that's hosting the server.

thenick191

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: Unable to connect error
« Reply #3 on: February 05, 2015, 03:31:58 PM »
Here's the connect that I do:
TNManager.Connect(externalIP, internalIP);

I get the IP objects from the lobby client known servers. I'd assume this would be the better solution so it knows at computer on the network has the server without port forwarding

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unable to connect error
« Reply #4 on: February 06, 2015, 10:02:37 PM »
Yes, that's fine, but it can fail if:

1. The router doesn't allow loopback. This causes 'externalIP' connections to try to connect to the router instead of your PC.
2. You have a firewall that's blocking inbound connections. Commonly happens with anti-virus software.

thenick191

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: Unable to connect error
« Reply #5 on: February 09, 2015, 07:17:23 AM »
Ah okay, I'll try testing with computers on different networks. I hope that it's just that simple and will work!

Thanks!