NET_Timeout() and NET_Poll() are not working on mac osx.
Actually this only happens with UDP sockets (j.n.DatagramSocket). It also happens with the NIO equivalent.
And most significantly, it only happens with empty packets. ie. if a client sends an empty UDP message, then poll() does not wake up. It works in all other cases. Replacing poll() with select() fixes the problem.
poll() system call is not firing on sockets.
Need to define USE_SELECT in networking code
to avoid calling NET_Poll() and implement NET_Timeout() using select() instead of poll.