This project contains a fully functional Trivial File Transfer Protocol (TFTP) server written in Java as part of the Computer Networks – an Introduction (1DV701) course. The server handles both read (RRQ) and write (WRQ) requests over UDP and follows the TFTP specification for DATA, ACK, and ERROR packets.
Supports core TFTP operations:
- RRQ (Read Request)
- WRQ (Write Request)
- DATA packets
- ACK packets
- ERROR packets
File download (RRQ):
- Reads file in 512‑byte blocks
- Sends DATA packets sequentially
- Waits for ACKs with timeout + retransmission
File upload (WRQ):
- Sends initial ACK
- Receives DATA blocks and writes to disk
- Handles final block termination
Error handling:
- Missing files
- Invalid opcodes
- I/O errors
- Malformed requests