how to get any available port
Cameron Laird
claird at lairds.us
Tue Oct 4 19:08:02 EDT 2005
In article <mailman.1469.1128460390.509.python-list at python.org>,
<jepler at unpythonic.net> wrote:
.
.
.
>Here's how it behaved over several runs:
>$ python soc.py
>('0.0.0.0', 34205)
>$ python soc.py
>('0.0.0.0', 34206)
>$ python soc.py
>('0.0.0.0', 34207)
>
>I don't know for sure whether this is standard behavior for sockets, or whether
>it's a special behavior of linux.
.
.
.
It is standard behavior for sockets. To my surprise, I haven't
(yet) found an RFC that specifies it, but the behavior has a deep
and wide history--even Microsoft sockets respect the convention.
More information about the Python-list
mailing list