This project is an educational implementation of a networked application, built to explore core concepts such as client–server architecture, TCP sockets, blocking vs non-blocking I/O, and collaborative debugging. It prioritizes learning and clarity over production readiness.
- Students learning networking fundamentals
- Beginner cybersecurity practitioners
- Anyone wanting a hands-on introduction to TCP sockets without heavy abstractions
- Language: Python 3.x
- Core Libraries:
socket,select(Python standard library) - Operating System: Linux (developed and tested on Kali Linux)
- Optional Tooling: Public TCP tunnel (e.g., Pinggy) for remote access
No external dependencies or databases are used.
- TCP-based client–server chat
- Multiple concurrent clients
- Event-driven I/O using
select() - Message broadcasting (including sender echo)
- Temporary client identifiers (scalable to usernames)
TODO: Add screenshots or GIFs
- Linux OS
- Python 3.9+
- OpenSSH client (optional, for tunnel usage)
git clone https://github.com/ZakariaHn/chat-socket.git
cd chat-socket
pip install -r requirements.txtSERVER_HOST=0.0.0.0
SERVER_PORT=5050
CLIENT_SERVER_HOST=localhost
CLIENT_SERVER_PORT=5050python3 src/server.pypython3 src/client.py