[UDP] Set timeout for recvfrom
sock.recvfrom(size)
is a blocking call, but there should be a way to give it a timeout?
or worst-case convert socket to non-blocking, but in that case, sock.recvfrom(size)
will always return immediately, but with no data if there is no data, so we have to have our own loop to wait until there is data.. with timeout.