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

Minh Luu minhl at toll.com.au
Sat Jun 26 09:57:30 EDT 2004


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)

server = internet.TCPServer(myPort, serverFactory)


More information about the Twisted-Python mailing list