Page 1 of 1

D2X-W32 v1.1.8: UDP/IP support improved

Posted: Mon Mar 14, 2005 5:55 pm
by Diedel
During tests I found out today that while my UDP/IP implementation worked on a single computer or a LAN, it did not work when playing over the internet.

To fix that, I have added an input field for the client (non game host) IP address.

At least for a regular broadband connection w/o router, you can find out your IP address by right clicking on the network symbol in the system tray, selecting "Status" and looking up the client IP address in the "Details" tab (if it's not named "Details" on your computer, just browse through the tabs).

Posted: Mon Mar 14, 2005 6:49 pm
by fliptw
Why can't D2x find that info out for itself?

Posted: Mon Mar 14, 2005 7:53 pm
by Diedel
Tell me how ... it contains a function to get the computer's "own" IP address, but that returns a different one than the network adapter's client IP. If you know how to get that one, tell me. :)

Actually, the current solution is a kludge.

Posted: Mon Mar 14, 2005 8:02 pm
by fliptw
this might be useful.

SDL on windows is a kludge.

Posted: Mon Mar 14, 2005 8:09 pm
by Diedel
The UPD/IP stuff has nothing to do with SDL.

Looked at the link, thx.

GetAdaptersAdresses() looks pretty useful.

How do I find the adapter that is actually used for D2X, esp. if more than one network adapter is present?

Posted: Tue Mar 15, 2005 1:32 am
by Ferno
Should be an ID attached to it. IE: Adapter0, Adapter1.

but that's just a guess.

Posted: Tue Mar 15, 2005 3:34 am
by Diedel
Ferno,

misunderstanding. I don't know a way to tell which adapter actually connects to the inet and is being used for D2X's traffix.

Btw, the above function is for WinXP, so I cannot use it. I need something more general. The best solution would be to find out which source IP has been used by sendto().

Posted: Tue Mar 15, 2005 5:58 pm
by fliptw
I think its adapaters with private IPs before public IPs, assuming the adapters have valid gateways

Posted: Tue Mar 15, 2005 6:34 pm
by Diedel
Problem solved.