5 Commits

Author SHA1 Message Date
taptap 4b68ef17ed Fix compression implementation and reduce benchmark timeouts
- Revert streaming compression to non-streaming approach (fixes decompression errors)
- Reduce client timeout in benchmark from 600s to 60s
- Simplify wait time calculation in benchmark to fixed 2s

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-25 14:55:03 +02:00
taptap 948542394e feat: Implement reliable UDP transfer with retransmission
- Add seq_num and flags to udp_packet_header_t for reliability
- Add MAGIC_UDP_ACK packet type and udp_ack_t struct for ACKs
- Add UDP constants: WINDOW_SIZE=16, MAX_RETRIES=5, RETRANSMIT_MS=100
- Server: Send cumulative + selective ACKs during UDP transfer
- Client: Implement sliding window with retransmission
- Client: Add send_file_udp() and send_file_udp_single() functions
- Fix server make_path call to not create filename as directory
- UDP mode uses single-file protocol (not batch) for reliability

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-24 21:49:50 +02:00
Theo Tappe 31b8e890d2 Improve: Increase UDP knock timeout from 5s to 30s
The 5-second timeout for UDP handshake (knock) was too short for
some network conditions. Increased to 30 seconds for better reliability.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-24 12:44:13 +02:00
Theo Tappe 1a9d6fde96 Refactor: Clean up batch header reading in server
Replace manual unpacking of batch_meta_header_t fields with direct
struct field reads. The magic was already read separately, so we
now read count, total_name_len, and total_size directly into the
struct fields, which is cleaner and less error-prone.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-24 12:43:59 +02:00
Theo Tappe bacb61f6ec Fix: Add missing checksum field to file_meta_t and file_task_t structs
The file_meta_t and file_task_t structs were missing the checksum field
that was being used in both client and server code, causing a compilation
error. Added uint64_t checksum to both structs and updated wq_push
declaration to match implementation.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-24 12:40:23 +02:00