TCP/IP [ADSL - Connection]

Blitz3D Forums/Blitz3D Programming/TCP/IP [ADSL - Connection]

GC-Martijn(Posted 2004) [#1]
H!

There is a problem in the world with fast ADSL connections :S

People in the Netherlands have ADSL with multi modems/routers.

They have a ip adres xxx.xxx.xxx.xxx and that's forwarding to the local ip.
its helps that people don't hack you.
BUT
Now I can't use the OpenTCPStream(ADSLip,port)

I did a simple test:
A friend have ADSL too and he was online with-out any firewall.
I ping to him and I get an Time-out
Then he did a ping to me and again Time-out

But how can I use OpenTCPStream(ADSLip,port) then?
How do other games make this connection?

THANKS
GC-Martijn


Chi3f Stadi(Posted 2004) [#2]
Hi,

the problem is that you have to allow packets (like TCP Datagrams with Syn flag) into your local network. And these packets have to be translated to your internal IP address as well. This can be done normally with a feature called port-forwarding.

For example: If you run a game as a server listening on port 6000 on your local ip 192.168.1.100, you have to forward traffic incoming for that port to the IP 192.168.1.100 ! Easy ...

rgds
Chi3f Stadi


GC-Martijn(Posted 2004) [#3]
Thanks for the info.

When I read the reply's I see that
I can't fix it with blitz3D code :S

But how can I make for example a good blitz3d TCP/IP program if people can't connect to each other?

Must some people edit there modem settings/open ports first so they can use my blitz3d program :S

Not cool...


Nacra(Posted 2004) [#4]
You might checkout the BlitzPlay library for some general info: http://www.blitzcoder.com/blitzplay

Otherwise a basic overview is that to connect over the internet you'll need a server that's able to get the relevant traffic (TCP and whatever port(s) you've chosen) and then your client code will probably need to connect to the server using TCP.

TCP establishes a session or connection, which UDP does not, and this enables you to work with clients using a variety of network connections. Like was mentioned above, users might have private IP addresses hidden behind firewalls and/or NAT boxes, yet they can still request information from your publicly available server.

If I'm wrong on using UDP over the internet, can someone please explain how it works?

And Ping is an odd protocol, not really UDP or TCP but anyway it's often blocked by firewalls. So I'd expect that you couldn't ping but could hit your buddy's machine using OpenTCPStream(ADSLip,port), but that he could not connect to you until you setup the proper port-forwarding rules.

And most people have dynamic IP addresses (in the States) and so they may change over time. I've heard of people keeping the same IP for years though, as long as they keep their cable or DSL modems on most of the time. The DHCP lease on an address is about a week on Comcast cable.

Good luck!