Added keep-alive mechanism in UdpHandler.