SDL2 C+ + how get to LAN IPaddress 192.168.*.* on ANDROID

hi,everyone

SDLNet_ResolveHost(&ip,“localhost”,0) has address is “127.0.0.1”

how can i do get “192.168..

thanks!!!

i use c++ on android
not use java

I believe you can do a SDLNet_ResolveHost( &ip, “your computers hostname”
); to get a LAN ip address.

http://www.beej.us/guide/bgnet/output/html/multipage/syscalls.html#gethostname

When in doubt, consult http://www.beej.us/guide/bgnet/
Literally the best network programming guide in existence, and also an
entertaining read.On Fri, Aug 15, 2014 at 9:58 PM, goxl wrote:

hi,everyone

SDLNet_ResolveHost(&ip,“localhost”,0) has address is “127.0.0.1”

how can i do get “192.168..

thanks!!!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Also, if English isn’t your first language, it’s been translated to a few
different languages, too: http://www.beej.us/guide/bgnet/On Fri, Aug 15, 2014 at 9:59 PM, goxl wrote:

i use c++ on android
not use java


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

MrOzBarry wrote:

I believe you can do a SDLNet_ResolveHost( &ip, “your computers hostname” ); to get a LAN ip address.

http://www.beej.us/guide/bgnet/output/html/multipage/syscalls.html#gethostname (http://www.beej.us/guide/bgnet/output/html/multipage/syscalls.html#gethostname)

When in doubt, consult??http://www.beej.us/guide/bgnet/ (http://www.beej.us/guide/bgnet/)
Literally the best network programming guide in existence, and also an entertaining read.

  hi,everyone

SDLNet_ResolveHost(&ip,“localhost”,0) has address is “127.0.0.1”

how can i do get “192.168..

thanks!!!


SDL mailing list
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

thanks
but this use platform API,how can i do get it only use SDL2 API> On Fri, Aug 15, 2014 at 9:58 PM, goxl <@goxl (@goxl)> wrote: