Chat Python

A small multi-user chat I wrote while learning sockets and threads in Python

What I built

I wanted a project where the networking was visible rather than hidden behind a framework. A central Python server accepts TCP connections, gives each client its own thread, and relays messages to everyone in the room. A small Tkinter client keeps the terminal plumbing out of the way.

What it does

  • Concurrent client handling via threading
  • Real-time message broadcasting
  • Dynamic nickname assignment and management
  • Graphical User Interface for clients

Server Architecture

The server acts as the central hub, managing socket connections and message distribution.

  • Listens for incoming TCP connections
  • Spawns a new thread for each connected client
  • Broadcasts messages from one client to all others
  • Maintains a registry of active users

Client Application

The client provides an intuitive interface for users to interact with the chat room.

  • Threaded message reception (non-blocking UI)
  • Tkinter-based GUI for message display and input
  • Automatic connection handling and protocol management

Built with

Language: Python 3.
Networking: socket library for TCP communication.
Concurrency: threading for parallel request handling.
GUI: tkinter for the client interface.

Link repo: GitHub