How different protocols interact with eachother in Twisted

Posted by stsupermouse on Stack Overflow See other posts from Stack Overflow or by stsupermouse
Published on 2010-05-17T09:41:22Z Indexed on 2010/05/27 4:11 UTC
Read the original article Hit count: 281

Filed under:
|
|
|

The scenario I want two different protocols interact with each other is as below:

A and B is two different protocols. First A will interact with the server and retrieve some values. Only after A finishes retrieving the values , B will start to interact with the server.

Now my problem is that is there an elegant way to initial B when A retrieves the values.

Currently I just initial B in A's data process function. But i don't think that this is an elegant way.

What I mean an elegant way is that the initialization of B is done by a flow controller or something like that, but not another protocol.

Is there an elegant way? such using defered or any other things.

I'm just new to twisted, not knowing very much about defered....

Thank you very much!

© Stack Overflow or respective owner

Related posts about python

Related posts about twisted