|
|
|
|
|
by dap
5157 days ago
|
|
(Response to jbooth, but for some reason I can't reply to that directly.) The whole point of sendfile is to make one system call to send all the data in one stream to another, which in general may block. If you're polling and sending only small chunks at a time (whatever you can write without blocking), is it really that much of an advantage over read/write on the same poll? (If you're not doing that, then you have to block, and you have to dedicate a thread to it.) |
|
It's still an advantage over read/write because you're getting the 0-copy behavior.