Code: Untitled.c Select all
The task in which I handle the TCP connection has a high priority in FreeRTOS support and during this time nothing serious is being done by other processes.
I have tried the following approaches:
Disable Nagle’s Algorithm (TCP_NODELAY).
Reduce/Remove Delay in the Main Loop (lower vTaskDelay or no delay).
Use select() instead of repeatedly polling sockets with delays.
Increase Task Priority for the recv/select handler.
Reduce Number of Sockets and simplify code logic.
Short recv() Timeout (via SO_RCVTIMEO with 1ms or similar).
In attachment I share the code and ask for some advice on how I can reduce the response time, because it is crucial in my application. On another modem operating via GSM this time was a maximum of 50ms.