- Information
- AI Chat
Was this document helpful?
Lab 4 - ---
Course: Networking Fundamentals (41092)
238 Documents
Students shared 238 documents in this course
University: University of Technology Sydney
Was this document helpful?
Week4 Lab: Socket Programming
Procedure for running the Python UDP and TCP client and server
Setup Project:
You should have installed Python and PyCharm. Note that the Linux and MacOS machines
has existing Python 2 and Windows machines are running python 3, so there are some minor
differences between the programs for the two operating systems. Our sample codes use
Python 3.
1) In PyCharm, create a project, ClientServer
2) Copy and paste the code from the end of this document (Appendix) into four separate files in
the project: TCPServer.py, UDPServer.py, TCPClient.py and UDPClient.py
3) Find your PC’s IP address
a. in Windows:
i. type “cmd” in the search box on windows and pressing <ENTER>
ii. In the command window type “ipconfig” to find your IP address.
b. in MacOS:
i. type “terminal” in the search box and pressing <ENTER>
ii. in the terminal window, type “ifconfig” to find you IP address