rt_tick
Description
The rt_tick function is used to trigger the RTTP engine to perform internal maintenance tasks, including timeout processing, retransmission control, congestion window adjustment, etc. The application must call this function regularly to ensures normal operation.
Syntax:
int rt_tick(RTEngine engine);
Parameters:
engine: The pointer to the RTTP engine instance returned by rt_init().
Note:
It is recommended to call this function frequently within the application's main loop. The shorter the call interval, the more precise the latency control, although CPU usage will increase accordingly. Generally, it is recommended to call it every 5-10 milliseconds.
Return Value:
Returns 0 on success; returns a negative error code on failure.