Added Checksum Function to server.cpp

Added checksum() to server.cpp
Server will now check that incoming checksum of matches the calculated checksum of the packet.
For a TRN message, server will check if a put has been sent first before checking for the correct sequence number.