[SDL] How to know the local IP address
mrickert85 at yahoo.com
Sun Apr 11 19:13:59 PDT 2004
I don't know, but let me just say that it can be
127.0.0.1 is allways supposed to be the computer
you're on. Multiple ethernet cards can have their own
seperate ip addresses as well (I'd know, I have 4 for
2 computers... 2 in each) as well as seperate modems.
I believe most games do this by connecting to a
metaserver (aka a server that just keeps track of meta
information, things like game servers) and then the
remote host (the metaserver) checks the ip address of
the connecting server.
Hopefully someone else has a better reply... like a
true answer to your question :).
--- SkunkGuru <skunkguru at hotmail.com> wrote:
> I'm using SDL and Net2 for a little client/server
> I'd like to show the player is local IP address...
> any idea ?
> I tryed:
> NET2_ResolveHost(&ip, "localhost", myport);
> but it returns 127.0.0.1... :-(
> SDL mailing list
> SDL at libsdl.org
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
More information about the SDL