socket send help

Bryan Olson fakeaddress at
Tue Jan 6 01:49:59 CET 2009

Gabriel Genellina wrote:
> Bryan Olson escribió:
>> Gabriel Genellina wrote:
>>> greywine at escribió:
>> [...]
>>>> A simple server:
>>>> from socket import *
>>>> myHost = ''
>>>  Try with myHost = '' instead - a firewall might be blocking 
>>> your server.
>> Just a nit: I'd say the reason to use '' instead of the empty 
>> string is that a firewall might *not* be blocking your server.
>> The Python sockets module interprets the empty string as INADDR_ANY, 
>> which means to bind to all available adapters including the loopback, 
>> A.K.A localhost, A.K.A ''.
> I thought a firewall would block an attempt to bind to any routeable 
> address, but not to localhost. So using INADDR_ANY would be rejected.

So you thought this would fail at bind()?

My understanding is that firewalls block network traffic, not system calls.


More information about the Python-list mailing list