[Twisted-Python] How to make a service dependent of another?

2009-05-15 Thread coder_gus
Hi, I have a pb client and a tcp server. How can I make the server start only after/if the client started? Thanks. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] How to make a service dependent of another?

2009-05-15 Thread Terry Jones
> "Gus" == coder gus writes: Gus> I have a pb client and a tcp server. How can I make the server start Gus> only after/if the client started? Hi Gus You might take a look at the code here http://www.twistedmatrix.com/pipermail/twisted-python/2009-February/019249.html and if you go back

Re: [Twisted-Python] How to make a service dependent of another?

2009-05-15 Thread Christopher Armstrong
On Fri, May 15, 2009 at 4:11 AM, coder_gus 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 fe

Re: [Twisted-Python] How to make a service dependent of another?

2009-05-15 Thread Jean-Paul Calderone
On Fri, 15 May 2009 11:11:58 +0300, coder_gus wrote: >Hi, >I have a pb client and a tcp server. How can I make the server start >only after/if the client started? In general, the answer to "how do I do X when Y?" is "Put the code to do X in the callback that tells you Y has happened." So, for ex

Re: [Twisted-Python] help using deferred

2009-05-15 Thread Luigi Conte
2009/5/11 Jean-Paul Calderone > On Mon, 11 May 2009 19:49:19 +0200, Luigi Conte < > luigiandcosoluti...@gmail.com> wrote: > > > > [snip] > >in my script I have to use connect method and then I have to do some > >operations first of calling the start method > >1) start connection > > > >def st