sockets: bind to external interface
Thomas Rachel
nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915 at spamschutz.glglgl.de
Mon Apr 25 17:14:22 EDT 2011
Am 25.04.2011 22:14 schrieb Hans Georg Schaathun:
> On Tue, 26 Apr 2011 05:49:07 +1000, Chris Angelico
> <rosuav at gmail.com> wrote:
> : The way you talk of "the" external interface, I'm assuming this
> : computer has only one. Is there a reason for not simply binding to
> : INADDR_ANY aka 0.0.0.0?
>
> Ah. That's what I really wanted. Thanks a lot. I wonder why that
> was not mentioned in the tutorial I used ...
Generally, it seems better to use '' instead of '0.0.0.0' in this case
in order to stay compatible with other address families, especially INET6.
Thomas
More information about the Python-list
mailing list