3 ms·
>(or taking over sendfile, dumping a file to a socket or socket to file) splice only works if one of the two fds is a pipe. It cannot replace sendfile.
by Arnavion 2y ago
>(or taking over sendfile, dumping a file to a socket or socket to file)
splice only works if one of the two fds is a pipe. It cannot replace sendfile.
- duped 2y agoYou can do it with two calls to splice
- gpderetta 2y agoThat was the original implementation. I believe this has since been relaxed. I think the kernel will allocate a pipe internally in some cases. The man pages are known to be incomplete. In fact I think sendfile is implemented with the splice machinery now.