Experiment 8.3

To do this experiment you set your gateway to drop or corrupt a certain (large, for testing purposes) percentage of datagrams. Your server program, upon receiving the name of a file
  1. opens that file
  2. continually reads a (small, for testing purposes) number of bytes, puts them into a datagram, and for each datagram enters a while loop in which it
    1. sends the datagram
    2. waits for an acknowledgement using a select statement
    3. if the select statement times out, resends the datagram
    4. the loop terminates upon reception of an acknowledgement
  3. closes the file.

Now what? Assuming that you do not wish to terminate your programs manually, you send some kind of termination message and shut down. If you write your code in exactly this way, and if the jitter parameter passed to your gateway is positive, you will encounter a very interesting problem. Armed with this preliminary description of the problem, you will have no problem whatsoever deciding how to fix it. My advice at this point is to choose the quick and dirty solution. That solution will not be good enough for Experiment 8.4.


This site is maintained by by W. David Laverell of the Computer Science Department at Calvin College.
For assistance or corrections, please contact him at lave@calvin.edu.