DEMO INSTRUCTIONS FOR UDP AND TCP
Changes to code structure and test variables

1) make the codes more user-friendly, while loop moves from udp function
to main function.
2) Delete some test variables to make the codes look cleaner