01-30-2006 03:51 PM
01-31-2006 11:28 AM
02-01-2006 08:54 AM
02-01-2006 10:24 AM
02-01-2006 10:25 AM
02-01-2006 10:50 AM - edited 02-01-2006 10:50 AM
Hey OZI,
Then, yes, I would agree with you that it probably wasn't the timing of the callbacks. Hmmm. Just sending 1500 bytes or less doesn't guarantee that it will go into a single packet either. It may end up that way, but it isn't an actual TCP requirement.
I have never personally seen CVI misbehave like this, so I wonder if the second callback is part of the problem. Bilal pointed you to a document and there are several TCP sample apps in the sample folder of your CVI install. Compare your TCP_DATAREADY event code with the sample client's event code.
I wonder if your second read stream is getting corrupted with the first. Are you using static arrays or pointers to the read buffer? If static arrays are being used, look for null termination issues (tell TCP...Read( ) that the bytes to read should be 1 smaller than the static buffer). Then make sure that you are using a string function that will merge null terminated strings with each other properly. If pointers are being used, consider your malloc( ) use and make sure that you are joining the second callback's data with the first callback's data without overwriting some portion of it. You are welcome to post just the TCP_DATAREADY piece of your code for us to look over.
Orlan
Message Edited by cosmo on 02-01-2006 10:54 AM