[Twisted-Python] the magical port 0

grolgh grolgh at online.no
Fri May 11 17:26:22 EDT 2001


As you might know, binding to port 0, actually binds an unallocated port; but 
despite how useful this might be, twisted.net returns port 0 anyway.

The fix is easy, and that is to set port = skt.getsockname()[1] right after it 
has been binded.
I don't if this applies to win32, or any other platform, but I assume that it 

I have not done this in CVS, but I hope someone with more insight into 
twisted.net could do it :)

www.informative.f2s.com (be gone evil .zip-hating provider)

More information about the Twisted-Python mailing list