[devkitPPC/libogc] net_gethostbyname does not work with IPs

Post Reply
Midar
Posts: 4
Joined: Thu Jun 13, 2013 1:51 am

[devkitPPC/libogc] net_gethostbyname does not work with IPs

Post by Midar » Thu Jun 13, 2013 1:59 am

When trying to use net_gethostbyname() with an IP, it returns a resolve error.

This not only means that you have to check whether the address is an IP first and then use inet_addr(), it also means it breaks with how gethostbyname() works on any other OS, thus making ports unnecessarily hard. Strictly speaking, this is not required by POSIX, though, but everyone pretty much assumes it accepts IPs.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests