A robust Client-Server system for local network file transfers using the UDP protocol. This project implements block sending (chunking), end-to-end integrity verification, and a command-line interface with real-time visual feedback.
Next steps:
- Implement packet order verification with a waiting queue
- UDP Transfer: Fast communication using
DatagramSocketandDatagramPacket. - Data Integrity (SHA-1): Since UDP does not guarantee perfect delivery, each 1024-byte packet carries a 20-byte SHA-1 signature. The server recalculates the hash upon arrival and discards corrupted packets.
- Dynamic Progress Bar: Visual feedback in the terminal (
|====> | 50%) calculated based on the file size and the number of packets sent/received. - File Selection (GUI): The client uses Java Swing's
JFileChooserwith the operating system's native theme to facilitate file selection. - Logging System: The server records start, success, and error events with timestamps using
KotlinLogging.
π¦ kotlin-udp-file-transfer
β£ π client
β β π src/main/kotlin/bonfim/jordan
β β β π Client.kt
β£ π server
β β£ π files (Received files are saved here)
β β π src/main/kotlin/bonfim/jordan
β β β π Server.kt
β π README.md