posted 7 years ago
Basically, somewhere earlier in your code, you did a setSoTimeout() method call on that datagramSocket. This is done so that reads (ie. receive() calls) do not take forever.
And then, of course, when you call the receive() method, something is wrong. It doesn't get the datagram in the specified timeout, and hence, throws the exception. Now, as for what the "something" that is wrong is, you will need to debug it -- it could be that the sender is not running (or didn't send it within the timeout), it could be the network, it could be a firewall, router, etc.
Henry