getaddrinfo() edge case behavior on Windows, Linux and OS X
The POSIX getaddrinfo() function returns a list of IP addresses and port numbers for a given hostname and service (resp. port), superseding gethostbyname() and getservbyname(). Besides some flags, it accepts two string parameters. Either one of them is allowed to be null, representing localhost (or rather 0.0.0.0, depending on AI_PASSIVE) respectively an automatically assigned port. […] Read on…