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.
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest