Function nix::sys::sendfile::sendfile64
pub fn sendfile64(out_fd: RawFd, in_fd: RawFd, offset: Option<&mut libc::off64_t>, count: usize) -> Result<usize>
The portability is definied by:
#[cfg(target_os = "linux")]
Documentation
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_fd
and 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.