Updated sender.c to include packet loss and corruption as well as some timeout