TCPRecv issue

5 posts in this topic

cjconstantine 0

I'm sending a string with TCP, it's about 4100 bytes in length. The TCPRecv buffer is set to 32768, but for some reason it won't receive all the data all the time. TCPSend reports the right size being sent and the size sent is consistant. But sometimes I'll receive all the data, sometimes I recieve a percentage of it and once I got some of the beginning and some of the end with a chunk of middle missing.

I've tried upping the TCPTimeOut option and that didn't work. Here's some code:

Share this post

Link to post

Share on other sites

cjconstantine 0

I don't have time to look at it... but TCP data is buffered. You loop until you receive all of the data. I always preface my data packet with the length of the packet, so that my script know when it has received all the data... I have never experienced "missing" data. And I have sent billions of bytes.