A simple client-server chat application built with Python using Tkinter for the GUI and sockets for network communication. This application allows multiple clients to connect to a server, exchange messages, and provides administrative controls for managing connected clients.
- Start and stop the server on a specified port.
- Broadcast messages to all connected clients.
- Send private messages to individual clients.
- Kick or ban clients based on IP address.
- Displays connection history and active client list.
- Friendly GUI interface using Tkinter.
- Connect to a server using host IP and port.
- Choose a display name and message color.
- Send messages to all clients or disconnect gracefully.
- Receive messages with timestamps and color-coded usernames.
- Simple and intuitive GUI for easy interaction.
- Python 3.x
- Tkinter – GUI development.
- Socket – TCP/IP networking.
- Threading – Handle multiple clients simultaneously.
- JSON – Message serialization and communication.
- Clone this repository:
git clone https://github.com/MPALONDON/GUI_Network.git
cd GUI_Network- Ensure Python 3.x is installed.
- Install any required packages (all are part of Python standard library, no extra packages required).
- Run
server.py. - Enter a port number and click Start Server.
- Use Broadcast, PM, Kick, and Ban buttons to manage messages and clients.
- Click End Server to shut down.
- Run
client.py. - Enter your Name, Host IP, and Port Number.
- Choose a message color and click Connect.
- Type messages in the input box and click Send.
- Click Disconnect to leave the server.
GUI_Network/
├── server.py
├── client.py
├── README.md
├── favicon/
│ └── Web_.ico
└── screenshots/
├── Chat Server.png
└── chat client.png
- Server: Listens for client connections and manages all connected clients. It handles broadcasting, private messaging, and client management using threading for concurrency.
- Client: Connects to the server and communicates by sending and receiving JSON-encoded messages. Each message includes flags, sender info, timestamp, and color.
- Only one server can run per port.
- Banned clients are blocked by IP.
- Messages are color-coded for better readability.
- The app currently runs on local networks or within the same subnet.
- The application icon is located at
favicon/Web_.ico.
MIT License – free to use and modify.

