SDL2 C++ how get to LAN IPaddress 192. |
goxl
|
hi,everyone
SDLNet_ResolveHost(&ip,"localhost",0) has address is "127.0.0.1" how can i do get "192.168.*.*" thanks!!! |
|||||||||||
|
goxl
|
i use c++ on android
not use java |
|||||||||||
|
SDL2 C+ + how get to LAN IPaddress 192.168.*.* on ANDROI |
MrOzBarry
|
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:
|
|||||||||||||
|
SDL2 C++ how get to LAN IPaddress 192. |
MrOzBarry
|
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:
|
|||||||||||||
|
Re: SDL2 C+ + how get to LAN IPaddress 192.168.*.* on AN |
goxl
|
thanks but this use platform API,how can i do get it only use SDL2 API |
|||||||||||||||
|