24 gethostname(host_name,
sizeof(host_name));
34 void NetHost::Init(
const char* host_name)
36 if (host_name && *host_name) {
39 if (isdigit(*host_name)) {
40 DWORD addr = inet_addr(host_name);
41 h = gethostbyaddr((
const char*) &addr, 4, AF_INET);
44 h = gethostbyname(host_name);
50 char** alias = h->h_aliases;
56 char** addr = h->h_addr_list;
100 return *(addresses[0]);