What's new

Net play, anyone want to do it?

Hacktarux

Emulator Developer
Moderator
Does anyone know how to autodetect the internet ip address ? I know how to get the local ip address in a lan but i have never searched how to get the internet one.
 

Hacktarux

Emulator Developer
Moderator
I don't want to know what tool can do that, i want to know how i can do that in c++. (We are in emu coding section !!)
 
OP
Rice

Rice

Emulator Developer
Hacktarux

First, you need to get you local hostname, then get your own IP by your hostname.
 

Cyberman

Moderator
Moderator
Hacktarux said:
Does anyone know how to autodetect the internet ip address ? I know how to get the local ip address in a lan but i have never searched how to get the internet one.

Hmmm.. you mean the IP of a source request for a connection?
The IP of a address (www.yahoo.com) or what?
Whenever someone attempts to connect to a socket that's being listened to the IP address is returned. With UDP sockets it's similiar only the IP address is sent with each packet.

Not exactly sure what you are asking :)
 

Top