Homework 1 -- Modifying a client

Preparation

Within your Computer Science home directory create a protected subdirectory for this assignment by typing the following commands:

The task

You are going to modify the client program found in chapter 25 of the textbook to communicate with a simple server written for this class.

The server program is (hopefully) running on port 7700 of the computer iron-duff.cs.unca.edu. The server reads a single line of input, terminated by either a carriage return or line feed, and responds with a single line. Here's a sample response:

You can talk to the server directly using telnet by running the following command from both Unix and MS Win:

Type a line after telnet starts, and you should soon see the server response.

Getting started

Start this assignment by modifying the client program of chapter 25 of the textbook. You can find this program either in the book's CD-ROM or on the book's website.

Modify the program

You should modify the default host name and port number used by the client program. You should also make the client send a string, hopefully containing your name followed by a carraige return, to the server before it attempts to read data from the server.

Turning in the program

Once you have completed the program, you should copy it into the file ~/csci/363/home01/home01.c (where ~ is replaced by your home directory) onto the CSCI Unix workstations.

If you want to write the client in some other programming language, copy your program into some appropriately named file, such as ~/csci/363/home01/home01.java or ~/csci/363/home01/home01.perl, and send me email.

Asking for help

This is really not a programming assignment. It's just an early opportunity to make sure that you can compile and run a networked application. You may ask other people to help you complete this assignment, but every keystroke, mouse movement, and button press used to complete this assignment must be executed by you.

Checking the server

The server has been written to log its output at the following URL.

You should see log entries whenever a client connects to the server and whenever the server sends a response to the client. This is not a sequential server. Consequently, the client connection and response may not be in consecutive lines.

Due dates and turning it in

At 12:15 on Friday, 17 September, a script will be run to copy your program from your csci/363/home01 directory. This script will be run at 12:15 for five consecutive days. Each day your program is missing, 20% will be deducted from your grade for homework one.

In other words, don't be late.


Back to the CSCI 363 homework page
Back to the CSCI 363 home page