A lightweight and user-friendly chat application built with Python. This project includes a server to manage connections and a client with a graphical user interface for seamless communication.
- Real-time Messaging: Exchange messages instantly between connected users.
- User-Friendly Interface: Simple GUI built with
Tkinter
for intuitive usage. - Custom Alignment: Sent and received messages are aligned to the right and left, respectively.
- Scalable Server: Handles multiple connections efficiently using non-blocking I/O.
- Customizable IP & Port: Easily configure the server and client to run on different networks.
- Frontend (Client):
Tkinter
for GUIsocket
for networkingthreading
for concurrent operations
- Backend (Server):
socket
for networkingselect
for handling multiple connections
- Protocol: TCP with custom message headers for structured communication.
git clone <repository-link>
cd <repository-folder>
- Navigate to the project folder.
- Start the server:
python Server.py
- The server will listen for incoming connections on
0.0.0.0:3000
by default.
- Navigate to the project folder.
- Start the client:
python Client.py
- Enter a username when prompted and start chatting!
-
Server:
- Listens for incoming client connections.
- Maintains a list of connected clients.
- Broadcasts messages from one client to all others.
-
Client:
- Connects to the server using IP and port.
- Provides a GUI for users to send and view messages.
- Uses threading to handle incoming messages without freezing the interface.
- IP: Default is
0.0.0.0
. - Port: Default is
3000
.
To change the settings, update these lines in Server.py
:
IP = "0.0.0.0"
PORT = 3000
- IP: Update to the server's IP address.
- Port: Match the server's port.
Modify these lines in Client.py
:
IP = "10.113.18.221"
PORT = 3000
We welcome contributions to improve this project! Feel free to fork the repository and submit pull requests.
This project is licensed under the MIT License.
Special thanks to the open-source community for providing inspiration and resources.