specify `socktype' option for getaddrinfo() to get predictable result