RE: socket object, connection refused ...

From: Maxim Olivier-Adlhoch (maximo_at_meteorstudios.com)
Date: 11/17/03


Date: Mon, 17 Nov 2003 16:12:43 -0500
To: "Python-List (E-mail)" <python-list@python.org>

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@web.de]
> Sent: Monday, November 17, 2003 3:52 PM
> To: python-list@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
> 


Relevant Pages

  • Re: "invalid handle", sockets, threads and garbage collector
    ... your IntPtr value happens to coincide with a reference. ... The exception contains "invalid handle" message. ... Socket constructor problem ... finalization means closing the handle to resource. ...
    (microsoft.public.dotnet.framework.clr)
  • Re: passing this object
    ... Sock which extends CSocketComm. ... Once the socket class processed the data, ... reference of CVirtualScreen - screen.setMessage function ...
    (microsoft.public.vc.language)
  • Re: passing this object
    ... Sock which extends CSocketComm. ... Once the socket class processed the data, ... reference of CVirtualScreen - screen.setMessage function ...
    (microsoft.public.vc.language)
  • Re: passing this object
    ... Sock which extends CSocketComm. ... Once the socket class processed the data, ... reference of CVirtualScreen - screen.setMessage function ...
    (microsoft.public.vc.language)
  • Re: passing this object
    ... Sock which extends CSocketComm. ... Once the socket class processed the data, ... reference of CVirtualScreen - screen.setMessage function ...
    (microsoft.public.vc.language)