[][src]Function nix::sys::sendfile::sendfile

pub fn sendfile(
    out_fd: RawFd,
    in_fd: RawFd,
    offset: Option<&mut off_t>,
    count: usize
) -> Result<usize>

Copy up to count bytes to out_fd from in_fd starting at offset.

Returns a Result with the number of bytes written.

If offset is None, sendfile will begin reading at the current offset of in_fdand will update the offset of in_fd. If offset is Some, sendfile will begin at the specified offset and will not update the offset of in_fd. Instead, it will mutate offset to point to the byte after the last byte copied.

in_fd must support mmap-like operations and therefore cannot be a socket.

For more information, see the sendfile(2) man page.