[Twisted-Python] How to get port when using application

5 May
2008
5 May
'08
3:20 p.m.
Hello, I am going to use application and I have a question, I have a server that needs to get a free port, before I would do this :
...
port = reactor.listenTCP(0, f).getHost().port
...
and now with application all I could find to do the equivilent was :
...
t = internet.TCPServer(0, tcpFactory) port = p._getPort()._realPortNumber ...
the problem is that this isn't very clean as I'm accessing protected members.
Is there a better way of doing this?
Thank you, Gabriel
5692
Age (days ago)
5692
Last active (days ago)
0 comments
1 participants
participants (1)
-
Gabriel Rossetti