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>
This commit is contained in:
taptap
2026-06-24 21:49:50 +02:00
parent 3c98ca5803
commit 948542394e
9 changed files with 576 additions and 41 deletions
+1
View File
@@ -71,6 +71,7 @@ void wq_init(work_queue_t *q) {
q->tail = NULL;
q->done = 0;
q->error = 0;
q->use_raw = 0;
pthread_mutex_init(&q->lock, NULL);
pthread_cond_init(&q->cond, NULL);
}