When using a host with multiple network interfaces, socket.gethostbyname(socket.gethostname()) returns the IP address of one interface. If you are lucky, this is the one which can talk to the target. If you are not lucky...
To fix this, the app has to determine server address by "pinging" target.
When using a host with multiple network interfaces, socket.gethostbyname(socket.gethostname()) returns the IP address of one interface. If you are lucky, this is the one which can talk to the target. If you are not lucky...
To fix this, the app has to determine server address by "pinging" target.