In this exercise, you will implement a server for the protocol detailed in the previous task. Combine the code that you wrote previously and add the missing part for the application to be complete.
For each of the calls that you use, if one of them were to encounter an error, immediately return -1. All require headers are already included.
Manpages of interest: