[Idle-dev] Fix for long delays
dscherertemp at gmail.com
Sat Jun 7 01:25:36 CEST 2008
> Why not just bind to port 0 ("any") and then do self.port =
>> self.rpcclt.listening_sock.getsockname() to find what port the OS has
>> assigned? I tried that and IWFM.
> I've never heard of that option - it sounds great! Is it supported on all
> platforms? Can't that cause problems by binding to ports commonly used by
> other programs?
I can't guarantee that it works on all platforms, but my belief is that it's
standard BSD sockets behavior. It almost certainly works on Windows and
As for binding to commonly used ports, nearly all *client* programs are also
asking the OS to allocate ports for them, so I don't IDLE asking for two
ports instead of one is a big problem :-). I expect each OS does something
very similar to what you did internally, allocating ports from a range that
doesn't have a lot of well-known ports.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IDLE-dev