You will be improving and extending your first program.
In particular, you will extend the test server application so it can service multiple clients simultaneously.
Improvements:
Multi-threaded server -
Modify the TestSocket.cpp program so in server mode it spawns a new thread to handle every new incoming client.
You can use the functions declared in Threading.h to achieve this in a cross-platform manner.
For an example of how to use the functions in Threading.h, see TestThread.zip
Windows support -
This version should compile and run on both Windows and linux.
On Windows, any process doing socket communication must first call WSAStartup().
It should also call WSACleanup() when it is done with using sockets.
See section 1.5 of Beej's Guide to Network Programming.
MSDN has further details on WSAStartup and WSACleanup.
Thoroughly tested -
You should test your client and server in all the following scenarios:
katie (client) to katie (server)
katie (client) to london (server)
london (client) to london (server)
Windows lab machine (client) to Windows lab machine (server)
Windows lab machine (client) to katie (server)
Windows lab machine (client) to london (server)
You should test your server with a single client and with multiple simultaneous clients.
Robust to client failure -
Your server should continue to function even if a client fails (e.g. a client is killed with ctrl-c or disconnected from the network).
The server can give up on the failed client thread, but should continue to serve other existing clients and respond to future client connections.
Submission. Submit a zip of your project directory via Moodle.
You can safely delete large Visual Studio files such as Socket.sdf before zipping.