This is really funny - these programs are almost *exactly* the first assignment in the computer networks class that I taught at Columbia last Spring.
These programs are pretty much textbook examples of socket usage, so it's not too surprising, but that is kindof funny. I doubt they were actually copied out of a textbook; as they both had bugs in them, but I think I have most of the bugs fixed now. One that I didn't see earlier when I posted that is that the select loop is missing an if(FD_ISSET(fd,&readfds).... It works without it, but not smoothly. I found these posted to alt.2600 last summer and they've been sitting on my hard disk until this weekend when I pulled them out and started playing with them. Did any of your students try for the extra credit and add encryption?