Skip to content

Latest commit

 

History

History
60 lines (33 loc) · 1.51 KB

File metadata and controls

60 lines (33 loc) · 1.51 KB

🧠 Multithreaded Reverse Echo Server in Java

This is a simple Multithreaded Reverse Echo Server built with Java Socket Programming.
It starts a server that listens for client connections. When a client sends any message, the server responds with the reversed message. It supports multiple clients concurrently using threads.

🚀 Features

  • 🔁 Echoes reversed messages back to the client
  • 🔗 Socket-based communication
  • ⚙️ Handles multiple clients using multithreading
  • 🧩 Clean and simple Java code

🛠️ Requirements

  • Java 8 or higher
  • Terminal / Command Line OR any Java IDE (e.g., IntelliJ, Eclipse)
  • Git (optional, for version control)

▶️ Run the Server

java Server

This will start the server and it will listen for incoming connections.

▶️ Run the Client (in a separate terminal)

java Client

You can now type any message to send it to the server and receive the reversed response.

💬 Example

Client Input:

hello world

Server Response:

dlrow olleh

🧵 Multithreading Demo

You can open multiple terminals and run multiple clients simultaneously.
Each client will be handled by a separate thread on the server.

📝 Notes

  • Default port and host are set in the code (e.g., localhost:2020)
  • You can customize it by editing the Server.java and Client.java files
  • Gracefully handles client disconnection

👨‍💻 Author

Made with ❤️ by Abhinesh Jha
Feel free to fork, contribute, or raise issues!