D.Tkalcec (RTC)
|
|
« Reply #18 on: March 24, 2018, 12:05:59 PM » |
|
Based on your "workaround", I think I understand now what your actual problem was.
You've placed multiple remote function calls into the queue and have enabled the "TAniIndicator" component before placing each remote function call into the queue, but have disabled the "TAniIndicator" immediately after receiving the first result from the Server, ignoring the fact that other remote calls could still be waiting in the queue with more results to come later.
Because of that, it probably appeared to you as if the "TAniIndicator" component "froze", while in fact it was working until the 1st result arrived, after which you've disabled it, so that it was no longer working when other remote calls were being sent and/or their results received.
Since you are using RTC components in Multi-Threded and Asynchronous event-driven mode, you can place any number of requests and/or remote function calls into the queue instantly, but they will all be sent out (later) serialized, one after the other, with their results arriving in the same way. First the result from the 1st remote call, then from the 2nd and so on.
If you want to show an animation on the Client when data is being sent and/or received, you can use the "OnBeginRequest" event to enable your animation and then use "OnResponse*" events to disable that animation (there are multiple events there, depending on what happened with the response). Because of the asynchronous nature of RTC components and the way you are using them, this would actually be the most correct way to achieve what you wanted.
|