Function nix::sys::sendfile::sendfile64

source ยท
pub fn sendfile64<F1: AsFd, F2: AsFd>(
    out_fd: F1,
    in_fd: F2,
    offset: Option<&mut off64_t>,
    count: usize
) -> Result<usize>
Available on crate feature zerocopy only.
Expand description

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.