Updated both application for the UDP example.