Go-Back-N and the Selective Reject flow control Protocols.
In both cases we have seen that the Sliding Window size has to be carefully selected to avoid duplicates. Starting from your notes and code provide. Demonstrate the required window size by showing the cases where we have false duplicates.
Code / Program requirements:
1)Given the flow control protocol generate the window size for sender and receiver.
2)Assign the appropriate packet numbers and window sizes !
3)Generate an event by user input or file. (Here you create an event the represents the sending of a packet or Ack and you decide if it will be received successfully or lost.)
4)Based on previous step you are going to respond ... as the protocol dictates, ACK and window size and shift ... or request a retransmission.
5)Set your timers to logical values so you can demonstrate how the program works!