Posts

Showing posts from January, 2025

File Transfer Tool

Image
I was teaching UDP and TCP protocols this term. I did not want my students to get the wrong impression that UDP should not be trusted, so I created a simple File Transfer program using UDP. Initially, I just used a stop-and-wait protocol with a retransmission timer. But instead of coding it myself, I used one of these free AI tools (it has been a coral work, so I am not sure who did what, but ChatGPT, Claude2, and Qwen had a role in the set of programs developed here).  So what I did was to first define the different command-line options the Java program will support: java UDPFileTransfer SERVER  java UDPFileTransfer SEND filename [server] java UDPFileTransfer RECEIVE filename [server] With the first option, the program would start as a server, allowing a client to talk to its port 9876. The second and third cases will create a client that will try to either send or receive a file. If no server is specified, the assumption is that a server is running on the local host. Otherw...