Can't Connect TCP

Blitz3D Forums/Blitz3D Programming/Can't Connect TCP

alloidgames(Posted 2006) [#1]
I'm trying to get an online game running using TCP/IP (I know UDP is faster, but Im just starting with this :))

If I have the server and client running on my machine, and connect to IP "localhost" it works fine.

However I just can't get it to work with my friend, when we're using each others' IPs!

I don't know much about port forwarding, but we're trying to connect on port 81 so we each did this:

Start Menu > Control Panel > Windows Firewall > Exceptions > Add Port...

Then in the Add Port menu we put "Test" as the name, 81 as the port number, and clicked the TCP box.

Any help would be greatly appreciated!!!


skidracer(Posted 2006) [#2]
How is the client discovering the IP address of the server?

If you type IPConfig from the servers command line, the IP address the client needs to use to contact it will be the one allocated by the ISP, not the LAN address or any other local network devices that may be connected.

Next step would be pinging the server from the client to make sure it is visible.

Also, the server doesn't need to know the IP address of the client, it simply has to listen on a specific port so I'm not sure what you mean when you say "each other's ips"...


alloidgames(Posted 2006) [#3]
We've been using OpenTCPStream("IP",port) and CreateTCPServer(port), and just inputting IP manually (IE typing it in)

But typing in IPConfig, I see a different IP from the one I've been using...I'll try with this next time I reach him


alloidgames(Posted 2006) [#4]
Okay, sorry for double post, but here's an update:

I haven't managed to talk to my friend again yet, but I decided to run a test on my computer.

First, I opened two B3Ds, one with the client, one with the server. I ran the server, and as the client tried to connect to what I thought was my IP (the one I used testing with my friend). This caused my computer to think for a while, and then fail. Then I tried using the IPConfig IP (on the client) and it connected perfectly! So I assume this means that once my friend has this new IP, the problem should be solved?