04-16-2019 09:15 AM
Hello,
I need to implement a TCP socket cleaning/flushing to be sure it doesn´t contain any old/bad information.
The only way i have in mind is calling ClientTCPRead with the following parameteres, e.g.: dataSize = 4096, timeOut = 1
ClientTCPRead will be called several times while number of bytes read matches dataSize indicating there is still data (multiple of dataSize) in the TCP socket. Otherwise, if an error is returned, including timeout(-11), it will be exited.
The problem is that ClientTCPRead call lasts more than timeOut parameter (1 ms in this case) ranging from 1 ms to over 30 ms.
Is there a minimum of timeOut parameter? (i need to reduce this time)
Can TPC socket be flushed in other way?
Thanks in advance!
Alejandro
04-24-2019 04:23 PM
Hello AlePinto,
Can you please share your code?
Also, can you please tell me the final goal of the project?