I have a program to simulate a network with a packet sent back and forth from a client to a host. This simulation includes a chance for a packet to be dropped when sent. My client program is set up to send the packet back five times before terminating, but when a packet is dropped the client will not stop waiting until manually terminated. What do I need in order for the client program to recognize when a packet is dropped or is taking too long to return?