I made this change, but I still get the same result.Quote:
Originally posted by anonytmouse
rc = getaddrinfo(hostname,&port,NULL,&res);
[in] Pointer to a null-terminated string containing either a service name or port number.
You are not passing a proper port string to getaddrinfo.
I didn't use gethostbyname becase the manual pages say that it is depricated by getaddrinfo.
I know I'm closer than I have been before. I will try and get this working today. Thanks for your help.