I\'m building an application that listens on both TCP and UDP, and I\'ve run into some trouble with my shutdown mechanism. When I call Thread.interrupt() on eac
Thread.interrupt()
DatagramSocket.receive blocks until it receives a datagram. Probably what you need to do is use setSoTimeout to make it timeout.
DatagramSocket.receive
setSoTimeout