Skip to content

ketanbaba2006/Client_Server-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Java Client-Server Chat Application

A simple Java networking project that demonstrates real-time communication between a client and server using Socket Programming.

This project uses TCP sockets to establish a connection where the client sends messages to the server and the server responds back interactively through the terminal.

Features

  • Real-time client-server communication
  • Java Socket Programming
  • TCP/IP based connection
  • Interactive terminal chat
  • Beginner-friendly networking project
  • Separate client and server implementation

Technologies Used

  • Java
  • Socket Programming
  • TCP/IP Networking
  • BufferedReader
  • PrintStream

Project Structure

β”œβ”€β”€ ChatServer.java
└── ChatClient.java

How It Works

  • The server starts and waits for incoming client connections on port 2100.
  • The client connects to the server using localhost.
  • Messages are exchanged between the client and server through terminal input/output.
  • Communication continues until the client enters End.

Steps To Run The Project

1. Compile Both Files

Open terminal in the project folder and run:

javac ChatServer.java
javac ChatClient.java

2. Start The Server

Run:

java ChatServer

You will see:

Server Application Is Running...
Server Is Waiting At Port 2100

3. Start The Client

Open another terminal window and run:

java ChatClient

You will see:

Client Application Is Running...
Connection Is Successful With The Server

Chat Communication

  • Client sends message to server
  • Server receives and replies
  • Communication happens continuously

To stop communication, type:

End

Learning Concepts

This project helps in understanding:

  • Client-Server Architecture
  • Java Networking
  • Socket Communication
  • Input/Output Streams
  • TCP Protocol Basics

Future Improvements

  • GUI based chat application
  • Multiple client support
  • Message encryption
  • File sharing
  • Chat history storage
  • User authentication

Author

Ketan Lade

About

πŸ’»βš‘ Java Client-Server Chat Application πŸ”Œ Real-time communication using Java Socket Programming 🌐 πŸ“‘ TCP/IP based messaging system between client & server πŸ–₯️ Interactive terminal chat with live message exchange πŸ’¬ πŸš€ Beginner-friendly networking project to understand sockets, streams & communication protocols πŸ”₯

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages