[Twisted-Python] the magical port 0
glyph at twistedmatrix.com
Sat May 12 00:10:55 EDT 2001
I looked at this, but I think the current approach is best.
Since servers are (optionally) persistent, the fact that server.port is 0
tells you that the next time the server is brought in from a persistent
store, it may be on a different port.
My suggestion for this application is to call through directly to
On Friday 11 May 2001 16:26, you wrote:
> 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() right after
> it has been binded.
> I don't if this applies to win32, or any other platform, but I assume that
> it does.
> 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)
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
______ __ __ _____ _ _
| ____ | \_/ |_____] |_____|
|_____| |_____ | | | |
@ t w i s t e d m a t r i x . c o m
More information about the Twisted-Python