Project2 â€“ Error Control
The fundamental requirement of this project is to implement an error control protocol by using both Stop-And-Wait (SAW) and Go-Back-N (GBN) algorithms.
1. Your team will communicate and design the details of the protocol first. It may include, but not limited to, maximum payload size, header size, number of fields, size of different fields, different possible code values for certain fields, message sequencing for both SAW and GBN.
2. After your team finished the protocol design, each of you will implement both SAW and GBN independently. Your implementation should provide full duplex communication. It means your program should be able to do sending and receiving at the same time. Your program should be able to communicate with your team membersâ€™ program based on SAW to SAW and GBN to GBN.
3. Your program will use UDP segment as an underlying unreliable channel and put your protocol data unit (including header and payload) in the payload of the UDP segment.
4. To simulate the packet loss we will use pseudo random number to control that.
a. First your program will ask the user to input a number between [0, 99]. This number means the percentage of packet losses will happen in the transmission.
b. Then each time before your send your protocol data unit, your program will generate a pseudo random number in the range [0, 99] with the random seed set to the current system time. If the random number generated is less than the user input number then the current protocol data unit wonâ€™t be sent to simulate a packet loss.
5. Your protocol doesnâ€™t need to consider error-detection and error-correction.
6. After your program finishes the transmission of the data file it should provide some basic statistic data including how long takes it to transmit the data file, how many total protocol data units sent, how many â€œlostâ€ (simulated), etc.