This repository contains a Java-based chatting application developed as a Semester 3 OOP microproject. The application demonstrates socket programming concepts by enabling real-time chat communication using localhost sockets.
Repository: java_socket_application_project on GitHub
Language: Java
Created: 23 September 2023
Owner: not-available-aryan
The main goal of this project is to provide a simple, educational example of how socket programming can be used to create a basic chat application. It is designed for learning and experimenting with Java networking, object-oriented programming (OOP), and client-server communication patterns.
- Local Chatting: Communicate between multiple clients on the same machine using localhost sockets.
- Socket Programming: Demonstrates Java’s socket API for sending and receiving messages.
- Client-Server Architecture: Separates concerns between chat clients and a central server.
- Real-Time Communication: Messages are delivered instantly between participants.
- Java Development Kit (JDK) installed (version 8 or higher recommended)
- Git (for cloning the repository)
- Any Java IDE (optional)
-
Clone the Repository:
git clone https://github.com/not-available-aryan/java_socket_application_project.git cd java_socket_application_project
-
Compile the Source Code:
- Open the project in your IDE, or
- Use the command line:
javac *.java
-
Start the Server:
- Run the main server class (e.g.,
java ChatServer
).
- Run the main server class (e.g.,
-
Start the Clients:
- Open separate terminals for each client.
- Run the client class (e.g.,
java ChatClient
).
-
Begin Chatting:
- Enter messages at each client terminal to chat via the server.
Note: The actual class names (ChatServer
, ChatClient
) may vary. Please check the repository for exact filenames.
- Server Class: Listens for incoming client connections, receives messages, and relays them to other clients.
- Client Class: Connects to the server, sends messages, and receives incoming chat messages.
- Socket Handling: Underlying logic for managing connections and data transfer between server and clients.
Feel free to fork the repository, submit pull requests, or open issues for bug reports and improvement suggestions.