LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ClientTCPWrite

I am working on a piece of test equipment which contains an embedded PC running LabWindows/CVI program. The program opens and reads in files stored on the harddrive of the embedded PC and sends the data, via Ethernet, to other boards within the unit using calls to ClientTCPWrite(). When I send small chunks of data (up to 4096 bytes) it works fine.

 

When I try to send a huge chunk of data I get a -8 back from ClientTCPWrite(). Calls to GetTCPErrorString() and GetTCPSystemErrorString() result in "Write Failed" and "WSAENOBUFS: No buffer space available" respectively.

 

The help says  that as long as the number of bytes you are trying to write is less than UINT_MAX. Searching library include files it looks as if UINT_MAX is 0xffffffff. I am limiting my writes to 0x7fffffff.

 

What is this error message telling me and what do I need to do to avoid getting it?

 

Thank you so much for any assistance you can provide.

 

Gwen Belt

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

I have also seen this when communicating with devices that do not have that much memory. To my experience, limiting the amount of data sent at once reliably solves this issue - as you said.

BTW: Have you read this at MS?

Regards, Guenter

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

Thank you Guenter. I appreciate your speedy response.

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