Qasim Shah
All projects

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
Labelled project 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

  1. A threaded server with broadcast handling and terminal clients with separate input, receive, and heartbeat loops.
  2. A length-prefixed framing protocol that measures UTF-8 payload bytes.
  3. 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.