socket object, connection refused ...

Maxim Olivier-Adlhoch maximo at meteorstudios.com
Mon Nov 17 22:12:43 CET 2003


that's it !!!

The docs really are misleading, especially if you've done this sort of thing in other languages and localhost is used as a reference to 'self'... without reference to any NIC.

thanks soooo much!

-MAx
---
"You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun."
 

> -----Original Message-----
> From: Diez B. Roggisch [mailto:deets_noospaam at web.de]
> Sent: Monday, November 17, 2003 3:52 PM
> To: python-list at python.org
> Subject: Re: socket object, connection refused ...
> 
> 
> Hi,
> 
> > using 'localhost' or '127.0.0.1' always works, using my 
> actual machine's
> > ip or its hostname does not!!
> 
> I had the exact problem last week - I think there should be 
> an update to the
> docs, as these say:
> 
> <quote from socket example>
> # Echo server program
> import socket
> 
> HOST = ''                 # Symbolic name meaning the local host
> 
> </quote from socket example>
> 
> Unfortunately, this is not right - what happens wheny you 
> bind localhost or
> 127.0.0.1, the socket _only_ listens on your local loop back 
> device. When
> binging to '', this means "bind to all IPs of this machine" - 
> and thats
> exactly what you are looking for.
> 
> So try to either explictely bind to your IP, or '' - that will help.
> 
> Regards,
> 
> Diez
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 





More information about the Python-list mailing list