Nothing about that requirement is really "real time" in the conventional sense of that term. What you have is a program that needs to be able to open a UDP connection and send-and-receive data through it.
Often, this sort of programming is done using a "
select() loop." You can actually find a lot of information on that subject right here on this site.
A fairly detailed example can be found here:
http://www.gamedev.net/topic/310343-...-echo-example/.
Here's another:
http://www.linuxhowtos.org/C_C++/socket.htm
One trick with regard to UDP is that it's a one-way protocol with no guarantee that packets will be received at all, or received in any particular order. It is "unreliable and message-oriented" whereas TCP is "reliable and stream-oriented." (The word "reliable" has a specific technical meaning in this context.)
Sometimes, high-volume applications (as a phasor handler might be) are multi-threaded so that the select()-loop thread might be running at slightly elevated priority (which is okay, since it's asleep nearly all the time, but needs to respond quickly when awakened). More CPU-intensive work can then be handled by the normal-priority thread, knowing that the listener thread will always wake up timely to handle a packet going in or out.