I noticed some posts already discussing Error 66 associated with TCP Read, but none seem to cover the question I have. So, here I go... I have a TCP server in Labview which just reads from the TCP connection (it reads FRAMESZ bytes a time). But let's say I don't know the size of the data I'm sending from the client beforehand. Say N-1 frames have been sent, and then, the client reaches the last (Nth) frame, which it proceeds to send and then, right afterward, it closes the connection. The server doesn't know that Nth frame was the last frame, so, upon receiving that frame via TCP Read, it then calls TCP Read again to receive another ((N+1)th) frame. But the client has closed the connection, so that (N+1)th TCP Read in the server throws an Error 66, indicating the connection was cloed by the peer. How can this be avoided? Currently, I add one extra byte to the start of the frame: a 0 indicates this IS NOT the last frame an a 1 indicates this IS the last frame. Then, when the server encounters a frame beginning with a 1, it knows to not call TCP Read again. However, this adds (a small amount of) overhead to the communication. Is there any other way to handle this nasty situation? In C, recv() simply returns 0 when the peer has closed() -- is there no equivalent to this functionality in Labview??