A simple python-based chatroom I made a while back whilst learning Python.
To begin, you must first run server which will run on port 5000 and localhost by default.
python Server.pyNext, run the client specifying the address and port number on which it is to connect.
Python Client.py localhost 5000
The included code is heavily commented, explaining the functionality of each feature within the server and client files. The chatroom client works by establishing a handshake with the server and maintain this connection throughout a while loop.

