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

A forum just for you old time Descent and Descent2 players.
Post Reply
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

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

Post 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).
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6459
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post by fliptw »

Why can't D2x find that info out for itself?
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post 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.
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6459
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post by fliptw »

this might be useful.

SDL on windows is a kludge.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post 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?
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15163
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

Should be an ID attached to it. IE: Adapter0, Adapter1.

but that's just a guess.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post 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().
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6459
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post by fliptw »

I think its adapaters with private IPs before public IPs, assuming the adapters have valid gateways
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Problem solved.
Post Reply