I am trying to do a plugin like:
main process()
{
call plugin to do something;
}
plugin()
{
PART A: to encode a message, and send to other app;
PART B: to decode a message, and call PART A to check whether we need to send more messages.
}
So, for PART B, it will be called automatically, when the reply returns. When I am in PARTB, I will return to PART A, but I am in PART A, I can’t directly call PART B, because it should be called when a reply returns, so how can I do a loop in async call? When I send a message, how to wait until the reply comes to PART B. Thanks for your suggesion.
This is up to your implementation of main process and design of your plugins for example I have something like this:
Now plugin can have any desired architecture and can also receive incoming messages!