How different protocols interact with eachother in Twisted
- by stsupermouse
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!