CS 3342 Laboratory Problem Set 3

Due December 14, 2000, 8:30 a.m.

These problems are to be done on an individual basis following the Trinity University Academic Integrity Policy. Laboratory problems should be submitted electronically (e-mail to cs3342@ariel.cs.trinity.edu) on or before the due date and should contain a problem write-up, source code to any programs and data sets used in solving the problem. The submitted files should be ASCII text files having Unix end-of-line characters (please convert all Windows and Mac text files to Unix format-I have found that Emacs seems to do a reasonable job of such conversions). If several files need to be submitted, put them in a directory having name your-last-name-problem-set-number and create a tar archive of this file system and attach it to your e-mail problem submission.

An Internet Bulletin Board System

In this problem you are to design a simple internet bulletin board system that will allow bulletin board users to store and retrieve files on the bulletin board host machine.

This system will consist of two programs; the bulletin board server program and the bulletin board client program. You may use either datagram or stream protocols and you should also probably use a fixed port number for these programs. The bulletin board server should be able to run continuously in the background and respond to the following requests:

The client program should take input for requests from standard input and should write output responses (error messages and successful transfer messages) to standard output. This means that the client should be able to run interactively or quietly (with input/output redirection). The get and put commands, of course, read and write text files.

To run the bulletin board system you should first start the server on some machine on the internet by entering:

bbs&

on the bulletin board host machine.

Then entering:

qbbs < queries > query.out

on some machine on the internet should cause what ever bulletin board queries existing in the file queries to be processed by bbs. The responses will be written to query.out

Problem Set 3 Solution [ HTML ] [ PS ] [ PDF ]



John Howland
2000-10-30