Chat Python
Learning sockets and threads by building a chat app.
What I built
I wrote this to get some practice with TCP sockets and threads. A central Python server gives each connected client its own thread and relays messages to the rest of the room. The client has a small Tkinter window for reading and sending messages.
What it does
- Concurrent client handling via threading
- Real-time message broadcasting
- Dynamic nickname assignment and management
- Graphical User Interface for clients
Python chat demonstration (YouTube)
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.
Source: GitHub