Real-time LAN messaging application built using Qt and C++.
LANChat is a desktop-based local network messaging application that allows users connected to the same WiFi/LAN network to discover nearby users and communicate in real time.
The application uses:
- UDP broadcasting for nearby user discovery
- TCP sockets for reliable messaging
- Qt Widgets for the graphical user interface
Developed as a Qt/C++ networking project for LAN-based real-time communication.
- Automatic LAN/WiFi user detection
- Real-time online user updates
- Visibility toggle system (Visible / Hidden)
- Instant TCP-based messaging
- Message delivery failure handling
- Self-message prevention
- Typing indicators
- Message timestamps
- Online/offline notifications
- Persistent chat history
- Enter key message sending
- Auto-scroll chat window
- C++
- Qt 6
- Qt Widgets
- QUdpSocket
- QTcpSocket
- QTcpServer
- QTimer
LANChat/
│
├── src/
├── include/
├── ui/
├── screenshots/
├── README.md
└── CMakeLists.txt
Requirements
- Qt 6
- Qt Creator
- MinGW Compiler
- Install Qt and Qt Creator
- Open Qt Creator
- Click: File → Open File or Project
- Select the CMakeLists.txt file from the project folder
- Choose the Qt kit if prompted
- Configure the project
- Build the project in Release mode
- Run the application
- Launch multiple instances on devices connected to the same WiFi/LAN network
- Enter a username
- Click "Join Chat"
- Select a nearby user and start messaging
User Discovery
- Users broadcast their presence over the local network using UDP datagrams.
Messaging
- Messages are transmitted using TCP connections for reliable delivery.
Presence System
- Users can toggle visibility. Hidden users automatically disappear from nearby user lists.
- File sharing
- Better UI themes
- Notification sounds
- User avatars
Divyansh Gautam


