Multi-user TCP chat
Computer-networks coursework
A concurrent chat server and terminal clients with explicit message framing and heartbeat-based connection cleanup.
- Status
- Local course project
- Kind
- AI & systems
- Stack
- Python · TCP sockets · Threads · Protocol design
BUILD NOTES / Local course projectMulti-user TCP chat
Project overview · not an interface capture
Computer-networks coursework
Python / TCP sockets / ThreadsProject overview · not an interface capture
The problem
TCP carries bytes rather than application messages. The service needed to reconstruct complete frames while several clients sent and received concurrently.
What was built
- A threaded server with broadcast handling and terminal clients with separate input, receive, and heartbeat loops.
- A length-prefixed framing protocol that measures UTF-8 payload bytes.
- A three-client smoke test plus cleanup of a silent client after two missed heartbeat intervals.
What I learned
Concurrency and protocol boundaries need to be designed together: a network read is not a message, and a connected socket is not proof of a responsive client.