I have a thread (on android -Wifi) to receive UDP packet stream sent every 40ms. After capturing the packet, the thread will do work on data and gets back to receive within the 40ms.
Does the network layer accept UDP packets only after invoking socket.receive, or it stores packets (within a buffer) until a socket.receive claims it? (I know the buffer has size and will drop older ones) ( I also know that it will wait if nothing is available)
In other words, do I need to use double receive threads?