CMSC 360 -- Project 2

Project 2


Last week we talked about BSD sockets and started to implement a Socket structure.

The project

You are to use the Socket structure to implement both a server and a client (both threaded and non-threaded). Your server/client should be in the same application but differ based on command line args. Your server should handle multiple types of data: c strings, array of doubles, array of floats, array of ints, and a custom struct. You will need to write a read and write function in the Socket struct. You need to use casting to accept different data by overlaying structs. I don't care what your server does but it should read the data, process the data, and write the data back. Your client/server need to have multiple read/write cycles before closing.

The goods

You will be graded on the following things:
  1. A working server and client
  2. A readme which describes any changes in Socket, and any problems encountered with the Socket struct


You need to turn in your lab by using handin script on the CS servers. handin cmsc360 lab2 yourdirectoryname

The lab is due at 11:59pm Oct. 4th 2019.