newbie - SOAP.py sockets and localhost?

Duncan Grisby duncan-news at grisby.org
Tue May 14 05:06:33 EDT 2002


In article <mailman.1021303882.15378.python-list at python.org>,
 Gordon Scott  <gordon.scott at peregrine.com> wrote:

>Newbie here with a question I hope someone can answer.
>
>I was playing around with SOAP.py and the echoClient/echoServer demos.
>Running them on one machine ran fine, running them on two different machines
>yielded a '111, Connection Refused' error.

For some reason I don't understand, most Python socket examples give
the socket connection tuple as ("localhost", port). That tells the
server to _only_ listen on the localhost interface, meaning remote
clients can't connect. The correct thing to do is to use an empty
string like ("", port) since that causes it to listen on all network
interfaces.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the Python-list mailing list