Remember that with UDP, you'll probably not get your data assembled correctly, or even completely. So you'll have to think of some ways to encode it so you know if everything is ship shape.
You might be able to use TCP, and with a local server, at least you can handle missing packets and handle it accordingly.