Transfer files from server to client using the UDP protocol with the following features:
- Split data into chunks of 512 bytes.
- Pack the chunk with its order, its sha1 hash, and some metadata into a packet.
(As UDP does not have robust packet delivery or sequencing) - Send the packet to the client using UDP.
- The client collect the packet, send an ACK, and build the file back.
This is only a very very simple tool for demonstration purposes, written in less than 30 minutes.
- "get-file-list":
The server returns available file list as "Files: {filename1} {filename2} {filename3} ..." - "get-file {filename1} {filename2} {filename3}":
Downloads the requested files. Can accept multiple files in a single command.
Server:
python server.py {PORT}
Client:
python client.py {SERVER_IP} {SERVER_PORT}