Change WriteMsgUDP to WriteToUDP