splice() is a syscall on Linux. It transfers data from a pipe to another within kernel space. Optionally, either the source or the destination can be a descriptor or a socket, but at least one pipe is needed. As splice() avoids copying data from and to the userspace, it is more efficient than a read()/write() combo. A typical snippet which reads data from the network socket s and writes it to the file descriptor fd , looks like this: char buffer[4096]; ssize_t bytes; for (;;) { bytes = read(s, buffer, sizeof(buffer)); if (bytes == 0) break; write(fd, buffer, bytes); } You can rewrite that using splice(): int pfd[2]; ssize_t bytes; pipe(pfd); for (;;) { bytes = splice(s, NULL, pfd[1], NULL, sizeof(buffer), SPLICE_F_MOVE); if (bytes == 0) break; splice(pfd[0], NULL, fd, NULL, bytes, SPLICE_F_MOVE); } So this snippet is the reverse function of sendfile() . Howeve...