setSotimeout on a datagram socket
The server acts like an echo server. The clients sends 10 packets to server (1 sec of gap) When Client receives packets from the server, sometimes the packets are lost. So the client has to wait for up to one second for the packet to arrive. If the packet does not arrive in 1 second then the client should continue sending the other packets. How would i use .setSoTimeout to achieve this? Code: import java.io.*; import java.net.*; import java.util.*; /* * Client to process ping requests over UDP. */ public class PingClient { private static final int AVERAGE_DELAY = 100; // milliseconds public