| Linux / Unix Command: sendfile |
NAME
sendfile - transfer data between file descriptorsSYNOPSIS
#include <sys/sendfile.h>ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count);
DESCRIPTION
This call copies data between one file descriptor and another. Either or both of these file descriptors may refer to a socket (but see below). in_fd should be a file descriptor opened for reading and out_fd should be a descriptor opened for writing. offset is a pointer to a variable holding the input file pointer position from which sendfile() will start reading data. When sendfile() returns, this variable will be set to the offset of the byte following the last byte that was read. count is the number of bytes to copy between file descriptors.Because this copying is done within the kernel, sendfile() does not need to spend time transferring data to and from user space.
SEE ALSO
socket(2), open(2)
Important: Use the man command (% man) to see how a command is used on your particular computer.

