pub struct SendFile { /* private fields */ }Expand description
Kernel-to-kernel transfer (sendfile equivalent)
Implementations§
Source§impl SendFile
impl SendFile
Sourcepub fn new(source_fd: u32, dest_socket: u32, offset: u64, count: usize) -> Self
pub fn new(source_fd: u32, dest_socket: u32, offset: u64, count: usize) -> Self
Create new sendfile operation
Sourcepub fn execute(&self) -> Result<usize, KernelError>
pub fn execute(&self) -> Result<usize, KernelError>
Execute transfer without copying to user space.
For large transfers (>= 64KB), uses scatter-gather to read file data into DMA buffers and assemble once, reducing intermediate copies. For smaller transfers, falls back to 4KB chunked copy through kernel buffers.