Add udp support, and unit tests to match.