Use the sample code provided in the following repository:
https://github.com/remzi-arpacidusseau/ostep-code/Add reliable communication to your burgeoning communication library, in the form of timeout/retry. Specifically, your library should make a copy of any message that it is going to send. When sending it, it should start a timer, so it can track how long it has been since the message was sent. On the receiver, the library should acknowledge received messages. The client send should block when sending, i.e., it should wait until the message has been acknowledged before returning. It should also be willing to retry sending indefinitely. The maximum message size should be that of the largest single message you can send with UDP. Finally, be sure to perform timeout/retry efficiently by putting the caller to sleep until either an ack arrives or the transmission times out; do not spin and waste the CPU!
Server output should remain unchanged from the original.
Client should simply wait for the server and output accordingly.
server:: waiting...server:: read message [size:1000 contents:(hello world)]server:: replyserver:: waiting...
client:: send message [hello world]client:: waiting for replyclient:: got reply [size:1000 contents:(goodbye world)
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here