This is a simple TCP-based chat application built using Python. It allows multiple clients to connect to a server and communicate in real time.
- Multiple clients can join the chat.
- Messages are broadcasted to all connected clients.
- Clients can join and leave the chat dynamically.
- Simple implementation using Python sockets and threading.
- Python 3.10 or higher (Check your version by running
python3 --version)
- Clone the Repository
python3 server.pyYou should see:
Server is running...
Open a new terminal and run:
python3 client.pyEnter a nickname when prompted.
Open additional terminals and run more instances of client.py to simulate multiple users.
- If the server does not start, try a different port in
server.pyandclient.py(e.g.,PORT = 5050). - If messages are not showing up, check if the server is running properly:
If no process is listening, restart
lsof -i :55556
server.py. - Firewall Issues on macOS: Allow Python through the firewall using:
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp /usr/bin/python3
- Add a GUI using Tkinter.
- Implement message encryption for security.
- Deploy on a remote server for real-world use.
Enjoy chatting! 🚀