Can anyone tell me if the following code *should* work?
Its just that pClientEnt is always NULL. That ip address is my local address, ive tried it with remote addresses (such as googles - 216.239.59.99) but it is still NULL.
strcpy(tNewClient.IPAddress, "192.168.1.26"
;
pClientEnt = gethostbyaddr(tNewClient.IPAddress, (int)strlen(tNewClient.IPAddress), tNewClient.SockAddr.sin_family);
gethostname works ok, it can detect my computer name, but i just cant detect who is connected to me.
Thanks
Its just that pClientEnt is always NULL. That ip address is my local address, ive tried it with remote addresses (such as googles - 216.239.59.99) but it is still NULL.
strcpy(tNewClient.IPAddress, "192.168.1.26"
pClientEnt = gethostbyaddr(tNewClient.IPAddress, (int)strlen(tNewClient.IPAddress), tNewClient.SockAddr.sin_family);
gethostname works ok, it can detect my computer name, but i just cant detect who is connected to me.
Thanks