LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP Client data loss

Hello,

 

I have written a program that connects to a TCP Server using the TCP support Library of the CVI to exchange data between my program and that server. The problem is that it seems that this library seem to loose many received frames, as I see the PC has indeed received them (using the Wireshark to analyze the traffic I see the response from the server) but I do not get the "TCP_DATAREADY" event in the callback function.

 

Sometimes I have seen that I do not get the TCP_DATAREADY envent until I send more data through the socket, but in the Wireshark I can see that the data was received seconds befor.

 

This does not happen always but is quite frequent.

 

Thank you

0 Kudos
Message 1 of 2
(2,922 Views)

Hi,

   maybe I'm out, but are you sure that you read all data  from callback?

   I think that TCP_DATAREADY is not necessarily received by every IP frame.When there is lot of data communication or application performs some computation in time of incomming IP frame, it is chance that one TCP_DATAREADY contains data from multiple frames.I am also not sure if is guaranteed that in callback alwais can be read whole IP frame(specialy if it is fragmeted on the way)

0 Kudos
Message 2 of 2
(2,899 Views)