This is a real-time, multi-user messaging application built in Java, featuring a client-server architecture that allows users to communicate through direct messages, group broadcasts, and file sharing.
The application consists of three main components:
- Server (Server.java): Manages client connections, message routing, and system logging
- ** Client Handler (ClientHandler.java)**: Manages individual client connections and message processing
- Client (Client.java): Provides the user interface for sending and receiving messages
-
Broadcast Messaging
- Send messages to all connected users
- Real-time message distribution
- Instant notification when users join or leave the server
-
Direct Messaging
- Send private messages to specific users
- Targeted communication without disturbing other users
- Recipient-specific message routing
-
File Transfer
- Send files directly to specific users
- Supports various file types and sizes
- User-friendly file selection and saving process
- Clean, intuitive Swing-based graphical interface
- Resizable message area
- Color-coded buttons for different actions
- Username-based identification
- Localhost-based server connection
- Concurrent client handling
- Robust error management and connection handling
- Port 5000 for client connections
- Concurrent client management
- Server-side logging of events
- Client list management
- Timestamp tracking for connections and messages
-
Comprehensive logging to server_logs.txt
-
Tracks:
- User connections
- Disconnections
- Direct messages
- File transfers
- Launch server application
- Start client application
- Enter unique username
- Choose communication method:
- Broadcast message
- Direct message to specific user
- Send file to specific user
- List connected clients
- Java Swing for GUI
- Socket programming for network communication
- Multithreading for concurrent connections
- Stream-based file transfer
- Error handling and graceful disconnection
- Encryption for message and file transfer
- User authentication
- Persistent message history
- Support for multiple chat rooms
- Enhanced file transfer with progress tracking
- Java Development Kit (JDK) 8 or higher
- No external libraries required beyond standard Java libraries
- Currently operates on localhost
- No built-in encryption
- Recommended for local network or trusted environments
- Package:
messenger.server
for server-side components - Package:
messenger.client
for client-side components - Modular design allowing easy extension and modification
- Single server instance
- No persistent user accounts
- Limited to text and file communication
- Localhost-only communication
- Compile server and client classes
- Start server application
- Launch multiple client instances
- Begin messaging
- Local team communication
- Small office messaging
- Educational network programming demonstration
- Prototype for more advanced messaging systems
Licensing Open-source project for educational and personal use. Would you like me to elaborate on any specific aspect of the application? I can provide more technical details, explain the code structure, or discuss potential future enhancements.