SPRACT8 September 2020 66AK2H06 , 66AK2H12 , 66AK2H14
One thing can be done to increase the throughput is to use the No-Copy APIs inside NDK. The regular socket APIs performs a CPU copy of the data received on the wire. On the contrary, the No-Copy APIs do not do that by merely passing the data pointer. You have to manually free the received buffer from APIs. For more information, see the Enhanced No-Copy Socket Operation section in the TI Network Developer's Kit (NDK) API Reference Guide.
Checking the FTP receiving function in the same ftp_filerout.c file:
int32_t ftp_filerout_write(io_handler_t *ioh, char *path)
{
…
bytesRead = (int)recvnc(ioh->data_socket, (void**)&pBuf, 0, &hBuffer);
…
}
The code already uses No-Copy API recvnc(), so no further change is needed.