If bind a socket in Python to localhost,8200 this is accessible via http://localhost:8200/. but not http://x.x.x.x:8200/
If bind a socket in Python to x.x.x.x,8200, machinename,8200 this is accessible via http://x.x.x.x:8200/ and http://machinename:8200/, but not http://localhost:8200/
I thought localhost meant 'this machine', and that using it would 'loop back' to the machine's ip address, but it appears to be different ips.
Is 127.0.0.1 always a different ip address to the machines ip address?
update:
I understand that the actual numbers are different, but what does the loopback do?
For example wikepedia says that
'pointing a web browser to the URLs http://127.0.0.1/ or http://localhost/ will access that computer's own web site'
but that web site will also be accessible on x.x.x.x, and presumably be set up with a single socket on x.x.x.x. So how do both references work then?
conclusion:
I think I finally understand that 127.0.0.1 and x.x.x.x work like this
--127.0.0.1 ==\
>- Computer
--x.x.x.x ==/
and not
--127.0.0.1 ==\
--------------- x.x.x.x >- Computer
or
--x.x.x.x ==\
--------------- 127.0.0.1 >- Computer
Thanks all for the help