[Twisted-Python] How to start a server when ready

26 Jun
2004
26 Jun
'04
3:57 p.m.
Hi,
My program first connects to another server and get some data to initialises itself. When the initialisation finishes which could take few minutes, it then start listening on a port and waiting to server other clients. My question is, how do I delay the starting of my server until the program is ready? I am currently using some thing like this in my server.tac file, but this will star the server instantly.
client = internet.TCPClient(otherHost, otherPort, clientFactory) client.setServiceParent(myService)
server = internet.TCPServer(myPort, serverFactory) server.setServiceParent(myService)
Thanks,

30 Jun
30 Jun
12:50 a.m.
Call from twisted.internet import reactor; reactor.listenTCP(port, factory) once your code wants to start listening.
--
Itamar Shtull-Trauring http://itamarst.org
6913
Age (days ago)
6916
Last active (days ago)
1 comments
2 participants
participants (2)
-
Itamar Shtull-Trauring
-
Minh Luu