Testing out a UDP echo server

For a project I was working on, I needed to get to understand UDP communication to automate a certain process. The code below runs on the server which can be tested using a simple command line on a linux terminal:

What is typed in the terminal is echoed back. Obviously UDP has advantages and disadvantages. In the case for what I was using it for, it was a perfect solution.

UPDATE (4th May 2016):

I needed a way of connecting new devices to a network that would sniff out UDP traffic to locate the server to which it would then connect to so that they could be set up via another interface without actually needing any interaction with the device itself. The network itself was closed and so new devices wouldn’t have the local time set either. The UDP broadcast would also send the time too.