Skip to content

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Kotlin UDP File Transfer

Kotlin UDP Protocol CLI & GUI

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

✨ Features

  • UDP Transfer: Fast communication using DatagramSocket and DatagramPacket.
  • 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 JFileChooser with the operating system's native theme to facilitate file selection.
  • Logging System: The server records start, success, and error events with timestamps using KotlinLogging.

πŸ“‚ Structure

πŸ“¦ 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

About

A Client-Server system for local network file transfers using the UDP protocol. This project implements block sending (chunking) and end-to-end integrity verification.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages