On Fri, May 15, 2009 at 4:11 AM, coder_gus <coder_...@lavabit.com> wrote: > Hi, > I have a pb client and a tcp server. How can I make the server start > only after/if the client started?
Basically, you want to call listenTCP in one of the callbacks that get invoked when a client is successfully connected. There are a few of these: * the connectionMade method of your client protocol * the clientConnectionMade method of your client factory * the deferred that's returned from ClientCreator, if you're using it. Depending on your situation and the factoring that you want, any of these could be the most appropriate. -- Christopher Armstrong http://radix.twistedmatrix.com/ http://planet-if.com/ http://canonical.com/ _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python