CIS 432/532 Introduction to Computer Networks
Winter 2001

Program #1 FAQ

  1. Q: Can my client print OK after the user types "close:"?
    A: No. The assignment states that you should not print the server's response to a close command.

  2. Q: What if the user types "close:a bunch of junk"?
    A: The assignment doesn't specify the behavior here. You can handle this any way that you want (either accepting it as a valid close command or rejecting it as an invalid command). I will NOT be checking this when I grade programs. As long as the regular "close:" command works, I will be happy.

  3. Q: What if the user types "UPPER:uppercase this"?
    A: This is an invalid command. The commands themselves must be typed in lowercase.

  4. Q: Should I count a newline when I process the "count:" command?
    A: No.

  5. Q: Should I count a spaces when I process the "count:" command?
    A: Yes.

  6. Q: Do I need to handle the case where the arguments are listed in a different order on the command line?
    A: Yes. The sample code for C shows you how to do this in C.

  7. Q: What if the user doesn't type any arguments on the command line? Should I use some defaults or should I print an error message?
    A: Print an error message.

  8. Q: What is the equivalent of Java's "IndexOf" in C?
    A: Use the strchr() system call.

  9. Q: Does the user have to type a complete host name, like ix.cs.uoregon.edu, or can the user just type "ix"?
    A: The user should be able to use either one. The host lookup routines on a UNIX machine can handle both cases.