News for hackers. Stuff that matters.
Re:What developers should know about TCP by scott_s on Monday May 18, 2020 @09:09AM (#23221824)
If it makes you feel better, calling read() on a TCP socket is basically the same as calling read() on a file in a file system. In both cases, you can always end up reading less than you expected, and you always must check how much you actually read. In practice, this means that calls to read() for both should always be in a loop.

There are no comments on this comment yet.