CSCI 631 Section 1 Assignment 1 Implementation Notes

A simple and proper way to manage the files related to this assignment would be to make a directory named prog1 and place all of the files related to assignemnt 1 in it. Upon doing so, an ls command should reveal the following output:

[winans@w520 631]$ ls -l prog1
total 24
-rw-rw-r--. 1 winans winans  407 Jan 21 15:00 Makefile
-rw-rw-r--. 1 winans winans 1060 Jan 20 11:55 prog1-client.c
-rw-rw-r--. 1 winans winans  871 Jan 21 15:01 prog1-server.c
-rw-rw-r--. 1 winans winans 2885 Jan 21 15:00 wrapper.c
-rw-rw-r--. 1 winans winans  763 Jan 21 14:58 wrapper.h
[winans@w520 631]$ 

Here is the Makefile that will be used to in section 1 to compile the server and client application executable files. Note that this Makefile will name your client application executable prog1-client and your server application executable prog1-server as is customary on Unix style operating systems (there is no .exe).

In order to use this Makefile, place it in the same directory as the above-named files (as is obvious from the above ls command output) and then type make world. This will remove any old version that might be around as a result of a prior make command and start what is generally referred to as a clean build of your client and server application executable files.

Note: You need to provide a copy of all your source code files and make(1) it on both the tiger and lambda machines.

How To Run Your Programs

Once compiled (on both tiger and lambda), run your programs as demonstrated in class and discussed here.

As discussed in the assignment handout, if you can not bind to the port you have specified, try another one. For example:

winans@lambda:~/prog1$ ./prog1-server 9884
bind error: Address already in use
winans@lambda:~/prog1$ ./prog1-server 9885

While your server is running on lambda run the client on tiger with the same port number and specify the IP number of lambda.

[winans@tiger]$ ./prog1-client 99.89.218.77 13
21 JAN 2015 15:10:41 CST
[winans@tiger]$ ./prog1-client 99.89.218.77 9885
Wed Jan 21 15:12:33 2015

How To Hand In Assignment 1

You must hand in files with the following names:

There is no reason to provide any additional .c or .h files. (Nor should you hand in the Makefile or any test scripts.)

To hand in this assignment, execute the following command on tiger only:

~courses/bin/mail_prog.631 prog1-client.c prog1-server.c wrapper.c wrapper.h

Downloading Files From a Web Site

Note that an easy way to copy the above Makefile to a different machine would to be execute the following command:

wget http://faculty.cs.niu.edu/~winans/CS631/A1/Makefile

Last modified: 2018-05-28 11:04:55 CDT