LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

trouble getting TCP buffers

I have two CVI applications where one is sending TCP with Ini_WriteGeneric and the other is waiting for buffers from the TCP connection. I am finding that I am losing the first couple of bytes from the stream. (I have three of the ports open and each does the same). I have run Ethereal and can see that all of the buffers are getting to the recieving machine complete. Why would CVI be dropping part of the buffer?
0 Kudos
Message 1 of 3
(2,995 Views)
Hello

Here are a couple of things I would try to narrow down the problem. Try just using the tcp client server example that is included with CVI, you can find it under ./CVI/samples/tcp, and check to see whether they exhibit the same effects. Also, check each of the status codes returned by the tcp read write functions, just to be sure that there are no problems occuring. Check to see if your callbacks are running correcctly, you can use the GetTCPErrorString() or the GetTCPSystemErrorString () to get more information about the error codes. Also check to see the number of bytes transfered in the CVI example and in your code.

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 3
(2,995 Views)
Bilal, I think I have it narrowed down to a strcat issue! The reason that I know the writes are OK is that I can see the entire buffer correctly arrived via Ethereal. It is just getting the data from the TCP buffers and into my calloc'd buffer that si the issue, I think. See my post from a few minutes ago. Thanks.
0 Kudos
Message 3 of 3
(2,995 Views)