add udp support

Hi toby.
i make a simple PR for udp support, for your feedback.
i leave comment to be done in the future, and there would have exceptions (all test could be passed) while run test.
i don't know how to handle it hope you can give me some hint.

thanks!