tcp: Pass NULL as hostname to getaddrinfo if the string is empty