I’m currently developing a client application for Android that is supposed to do non-blocking reception of packets through UDP. Is there any way to setup a DatagramSocket so that it is non-blocking on its receive()?
Basically what I’m asking is how to set the MSG_DONTWAIT flag for a DatagramSocket.
What you are looking for is
java.nio.channels.DatagramChanneland friends.