CS 145A Lab 3 (due: Nov 21st 23:59:59)

Reliable Communication

Tasks for Lab 3: Implement a reliable communication protocol over UDP:

Requirements:

Sender:

Command Format: "sender <port1> <IP> <port2> <Filename>"

Sender should be able to read the file (specified by <Filename>) from local disk, cut it into packets, and send it to the receiver (specified by <IP> <port2>).

Sender can use <port1> to listen to the feedback from the receiver. Also, the sender should be able to retransmit the loss packet if necessary.

Receiver:

Command Format: "receiver <port1> <IP> <port2> <Filename>"

The receiver should listen to <port1> for data, write the data to <Filename> and send feedback to <IP> <port2> (sender) if necessary.

Possible Problems:

Submission:

Please submit your code and your documentation (sender.txt and receiver.txt). In the documentation, please write down your design of the program, describe your test suits briefly. Also, please write comments in your codes to help TA to understand your code.

Grading:

The TA will have two relayers which may drop packets in the middle. The "sender" under test will send data to the relayer and the relayer relays the packets to the "receiver" under test. The same happens in the feedback channel. So, the data packet or feedback packet may dropped in the middle.

TIPS

TA Hours:

Tue / Thu (20:00~22:00) JRG 170