Adapted udpListener example to new functionality and new callback signature