updated documentation and comments
Made send and rcv return error codes

recv() now takes a parameter, time, which is a reference variable(pointer) to an existing double

the program exits greacefully now when there is an error, instead of maybe runing forever(as a child process)