Changed client over from gethostname() to getaddrinfo(), gethostname() is an older obsolete practice