td
td copied to clipboard
Why do all td_receive calls, except the first one, take a long time to receive my specific response?
Scenario
- Initialize TDLib instance
-
td_send()->td_receive()quickly returns response - Wait some time
- Second
td_send()->td_receive()takes much longer to return response
During the delay in step 4, td_receive() returns other updates (e.g., "updateUser") before the actual response.
Questions
- Does TDLib process all accumulated updates before returning a specific operation's response?
- Is this behavior intentional? If so, why?
- Can we prioritize responses to specific operations over general updates?
- How to maintain consistent response times across operations, especially with accumulated updates?
All requests to TDLib are asynchronous. Responses are delivered as soon the request is completed. There is no way to deliver them faster.
All requests to TDLib are asynchronous. Responses are delivered as soon the request is completed. There is no way to deliver them faster.
Is it possible that the second request encountered a network issue? How can it be investigated?
It depends on the request. You can check TDLib logs for details.