Protocol with Endianness
Due: 5:00am, Friday, November 15, 2024
Get the Assignment Code
Login to your university Unix account and copy the assignment code to a location under your home directory. The starter code for this assignment is on the Linux server here:
/export/home/public/schwesin/cpsc328/assignments/project6
Description
For this project you will write the server program from the previous project. See the previous project description for the protocol.
Specifications
The name of the compiled program must be
server
.The input to the program must be in the form of command line arguments as follows:
-p <string>
(required) port-f <string>
(required) file to read string data from
The format of the string data file is each string on its own line. There is an example string file included in the starter code.
The program must fork a new process to handle each client connection.
The program must gracefully shutdown when it receives an interrupt signal.
The following rules must be added to the provided Makefile:
- Add a rule to build an executable named
server
. This must be the default action of the Makefile. - Add a rule called
clean
to remove any temporary files and theserver
executable.
- Add a rule to build an executable named
Turning in the Assignment
To turn in the assignment, execute the submit script by running the command
make submit
from within the project6
directory.
Grading Criteria
- Consistent coding style
- Modular design
- Correct implementation of the specification
- Correct error checking of library calls
Note: If the submission includes material that was not covered in class and the material is not properly cited, then you will receive a failing grade for this assignment. Additionally, if the program does not ensure that all bytes are sent and/or received, you will receive a 25% penalty on this assignment.