Updated receiver.c to include packet loss and corruption abilities (some timeout as well)