In order to use this code, first you need access to the router that you are currently using. When you are in the settings, you need to allows a port to forward to your computer. Make sure to use a port that is not in use for another task.
To create a server, it will ask you for the IP address of your device running the code and a port number. You will use your private IP address and the port number that you opened in the pervious step. You also want to get the public IP address of your computer for the next step.
The code will ask you for a IP address and you will use the public IP of the device running the computer. You then input the same port number that you have been using and a message that you would like to send. The server will take your message and return it will in all capital letters.