Add untested udp timeout functionality.

This needs to be tested and debugged.