How radwanrahman/tcp-chat-application works
This is a small TCP chat application. A participant enters a username in the client, which connects to the server; the server registers the connection and starts a handler. The client sends messages and commands, while the server handles user listing and admin kicks and broadcasts chat and membership updates. The server keeps connections and the first-user admin identity in memory. The excerpts show the runtime flow directly; no README or other product capabilities were provided.
Main entry points: client.py Chat client · server.py Connection acceptor
Components 6
Client
- Chat client
client.py
Server
- Connection acceptor
server.py - Client handler
server.py - Client and admin state
server.py - Message broadcast
server.py
Other components
- Participant
Connections 12
- Participant → Chat client: enters messages
client.py - Chat client → Connection acceptor: connects TCP
client.py - Connection acceptor → Chat client: prompts username
server.py - Chat client → Connection acceptor: sends username
client.py - Connection acceptor → Client and admin state: registers connection
server.py - Connection acceptor → Client handler: starts thread
server.py - Chat client → Client handler: sends messages
client.py - Client handler → Client and admin state: reads and updates
server.py - Client handler → Message broadcast: broadcasts updates
server.py - Connection acceptor → Message broadcast: broadcasts joins
server.py - Message broadcast → Chat client: sends messages
server.py - Chat client → Participant: displays messages
client.py