in reply to about a wrapper script

Usually, sending XML over UDP is not a very good idea.

UDP packet size is limited by the MTU of the network (tipically something between 400 and 1500bytes) and XML is very verbose and would probably generate messages larger than that.

So, first, ensure all your messages fit in UDP packets or send them over TCP or use a binary format to encode your data (for instance RPC).