ECE 544 Project 2: ARQ Scheme Design

[ Back to Software Project Homepage ]



As part of project 2 you are required to design a protocol to transport a file from one end of a communication link to the other end over an unreliable link.  The host which has the file is the "sender". The other host is the "receiver". Both directions of the link are lossy.
As the link is not perfect, you have to design an ARQ scheme to overcome possible packet loss. Stop-and-Wait, Go-back N, selective ACK, Sliding window..., using ACK or NACK?. It's all up to you. Any working link control scheme is acceptable.
However, to encourage you to design scheme with better performance, the designer of the program which spends least time to transport the given file (a 100KB-size file ) through the link will get extra credits.


Where to start

In the package you downloaded, you will find text2.dat.  This is the file you need to transfer.
In src/ directory, there are two files: common.h and common.cpp, which provide some basic classes and functions.  The documentation of them could be found in doc/ directory.

Please refer to the examples to learn how to use it.

Then, check newport.h to see how a child class is derived from the SendingPort class.

How to Test

If running the program only using the two application clients, setup the the used ports with the following characteristics:
  1. The packet over the link is either lost or received completely.
  2. Loss probability is 0.2.
  3. No partial information is heard and no needs for a CRC check.
I suggest you test your own program and fix any errors before submission.
You can use the provided virtual machine to test your program. Run each program in a separate console. The sender need send to "localhost" (the destination address of the sending port). The receiver also needs to send to "localhost" if it sends back some feedback signaling.

Use "diff" command to see if the received file is as same as the original file.