Add getopt() to UDP client and add some comments.