LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP reading problem

Hi !
I'm developing a client application that receives different types of data from a server.
If I receive a packet while I'm still processing the last one, after exiting from the Client TCP callback function, will I receive another DATAREADY event (generated by the second packet ) or not ?
 
Thank you !!

Message Edited by Massimiliano Conti on 09-08-2005 11:57 AM

0 Kudos
Message 1 of 3
(3,028 Views)

Hi Massimiliano.

Yes, you should continue to receive TCP_DATAREADY events as long as there is unread data on the connection. I have confirmed this in recent tests (with CVI 6.0).

If you prefer not to handle any new data immediately as it arrives, you could execute ClientTCPRead() in a loop which exits when there is no remaining data. If you do this, include an additional method of breaking out of the loop, based on elapsed time or number of iterations.

Regards,
Colin.

 

0 Kudos
Message 2 of 3
(3,015 Views)

Thank you very much !!

0 Kudos
Message 3 of 3
(3,007 Views)