News for hackers. Stuff that matters.
Re:SOCKMAP – TCP splicing of the future by amluto on Monday February 18, 2019 @08:18PM (#19195963)
> The naive TCP echo server would look like:

    while data:
        data = read(sd, 4096)
        write(sd, data)
Not if that’s the write syscall, since it can return with fewer bytes than requested having been written. The full C code detects this case and crashes, which looks totally wrong.

The Python-ish example should, at the very least, use sendall. But even that is potentially suboptimal.

There are no comments on this comment yet.