06-11-2025 09:03 AM
Hello Everybody,
I'm having some strange behaviors while using the Labwindows/CVI 2020 TCP library.
I use the TCP Callback Function to read data.
The first strange behavior is that, in some cases, there are packet retransmissions that can be seen in the wireshark traces. But above all, if the received buffer exceeds the MTU (1460 bytes) the packet is split and I receive 2 separate callbacks even if the buffer is sent in its entirety by the server. It is the first time I encounter such behavior. Normally if the buffer was split into two packets, the application still received a single callback. What could be the cause of this behavior? Could this be a process TCP event issue?
Another even stranger behavior is related to packet number 216.
My application sends the message contained in packet 211.
The server sends a buffer that exceeds MTU, I receive the callback for the content of packet 214 (Retransmitted, very strange because it is only the first part of the buffer) and subsequently I receive a callback for packet number 216. The problem is that calling ClientTCPRead in the callback generates a timeout. From the wireshark trace however there does not seem to be any problem. What could be the cause of this behavior? How could I solve it?
This last problem occurs sporadically and when it does occur you need to restart the application to make it work again.
Ciao
Mattia
06-22-2025 02:46 AM - edited 06-22-2025 02:46 AM
hi
read the ClientTCPRead func help. you need to read the data in loop
i also suggest that you add:
SetBreakOnLibraryErrors(0)
ClientTCPRead
SetBreakOnLibraryErrors(1)