version 1.67, 2008/03/06 03:08:08
|
version 1.68, 2008/03/07 19:17:34
|
|
|
hint.ai_family = AF_UNSPEC; // any family | hint.ai_family = AF_UNSPEC; // any family |
hint.ai_socktype = 0; // any socket type | hint.ai_socktype = 0; // any socket type |
hint.ai_protocol = 0; // any protocol | hint.ai_protocol = 0; // any protocol |
int success = getAddrInfo(hostName, NULL, &hint, &resolv); |
int success = System::getAddrInfo(hostName, NULL, &hint, &resolv); |
if (success==0) | if (success==0) |
{ | { |
// assign fully qualified hostname | // assign fully qualified hostname |
|
|
} | } |
else | else |
{ | { |
if ((he = getHostByName(hostName))) |
if ((he = System::getHostByName(hostName))) |
{ | { |
strncpy(hostName, he->h_name, sizeof(hostName) - 1); | strncpy(hostName, he->h_name, sizeof(hostName) - 1); |
} | } |