'I have get really confused in IP types with sockets (empty string, 'local host', etc...)

Im using python. I dont understand the purpose of empty string in IP to connect to if its not to connect between two Computers in the same LAN router.

My knowledge in network is close to zero, so when I reading in the internet somthing like this:

empty string represents INADDR_ANY, and the string '' represents INADDR_BROADCAST

So if you please will be able to explain me, like you explain to a baby that dont know nothing - what is the purpose of any of the follows in the IP location in socket object:

broadcast

''

localhost

and if there is more, so I will be glad to know about them too. Tanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source