A cross-platform chat application built with PyQt5 supporting both TCP and UDP protocols for network communication.
- TCP Protocol: Reliable, connection-oriented communication
- UDP Protocol: Lightweight, connectionless communication
- Protocol Comparison: In-app explanation of TCP vs UDP differences
- Tab-Based Chat: Public chat and private conversation tabs
- Unread Message Indicators: Visual notifications for new messages
- Online User List: Real-time display of connected users
- Message Formatting: Color-coded messages by sender type
- Configurable Connection: Customizable host and port settings
- Username Selection: Personalized identity in chats
- Error Handling: Robust management of network issues
- Server Notifications: System messages for user activity
- Multi-Client Support: Handles multiple simultaneous connections
- Protocol Mixing: Manages both TCP and UDP clients
- Message Routing: Intelligent message delivery
- Heartbeat Mechanism: Connection maintenance for UDP clients
- Python 3.6+
- PyQt5
git clone https://github.com/medovanx/chatter_wave.git
cd chatter_wave
pip install -r requirements.txtAlternatively, you can download pre-compiled executable files from the Releases page.
python server.pyDefault ports: TCP 9090, UDP 9091
- Launch client application:
python chat_client.py - Enter server details and username
- Select protocol (TCP/UDP)
- Click "Connect"
- Public Chat: Type in main tab
- Private Chat: Double-click username to open private tab
- ChatWindow: Main UI logic
- ChatTab: Individual chat tabs
- ChatClient: Network communication
- SignalHandler: Qt signal management
- ChatServer: TCP/UDP server implementation
JSON-formatted messages:
{
"type": "public|private|server|error|user_list",
"from": "username",
"to": "recipient_username",
"message": "content",
"users": ["user1", "user2", "..."]
}
