feat: add -f/--sendfile for zero-copy file transfer
- Add file_send_sendfile() using sendfile() syscall to send file content directly from fd to socket, bypassing userspace memory - Add use_sendfile field to Config struct (default false) - Add -f / --sendfile flag parsing in client.c - sendfile path in send_chunk() used when -f is set without -c or -s - send_files_multithreaded() falls back to single-threaded when sendfile is enabled (loader pipeline becomes unnecessary) - Add Sendfile (-f) test case to test.py
This commit is contained in:
@@ -11,6 +11,7 @@ typedef struct Config {
|
||||
bool use_multithreading;
|
||||
bool use_chunk_serialization;
|
||||
bool use_compression;
|
||||
bool use_sendfile;
|
||||
bool use_single_send_per_file;
|
||||
int compression_level;
|
||||
int num_connections;
|
||||
|
||||
Reference in New Issue
Block a user