Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/ch/ch8.php on line 2

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/ch/ch8.php on line 2

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/ch/ch8.php on line 3

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/ch/ch8.php on line 4

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/ch/ch8.php on line 5

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/ch/ch8.php on line 8

 

 


Douglas E. Comer


Computer Science Department
Purdue University
West Lafayette, IN 47907

webmaster: W. David Laverell


Companion Topics

Home

Book Information

Purpose of Site

Getting Started

Students

Faculty

"What's New"

"Coming Attractions"

"C Pointers"

Acknowledgements

 

 
Hands-On Networking: Chapter 8 Home > Student > Chapter Notes > Chapter 8

Chapter 8

8.1 8.2 8.3 8.4

This chapter is challenging, exciting, and, ocassionally, maddening. In addition to the difficulty of the individual pieces, you have the challenge of putting them together. You should think in terms of the ultimate goal which is data transfer so you need three programs:

  1. A gateway program.

  2. A server program.

  3. A client program.

Unfortunately, to start testing you need all three in some stage of development so you do well, as Professor Comer suggests, to break the project down into small chunks.

Now your programs will undoubtedly work correctly right away, but mine did not which brings us to the challenge of debugging. There is a blessing in disguise associated with a program that does not work out of the box, because there is a great deal to be learned from the debugger. In this case debugging itself is complicated by the need for three programs to coordinate. What I ended up doing was getting a window for each program, and then running one and debugging two the choice determined by the particular problem. Needless to say, I often made the wrong choice.

For the first three experiments you need to set your timeout value very high lest the act of debugging itself change your results, ie, your server keeps resending because you haven't gotten around to hitting the n key in your client window. Once you get to experiment 8.4, you face some real difficulties in debugging. The experiment has you thinking in microseconds so you will want to use the ualarm function, but when debugging you might want to use alarm which takes its arguments in seconds.



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