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.
- 🔁 Echoes reversed messages back to the client
- 🔗 Socket-based communication
- ⚙️ Handles multiple clients using multithreading
- 🧩 Clean and simple Java code
- Java 8 or higher
- Terminal / Command Line OR any Java IDE (e.g., IntelliJ, Eclipse)
- Git (optional, for version control)
java Server
This will start the server and it will listen for incoming connections.
java Client
You can now type any message to send it to the server and receive the reversed response.
Client Input:
hello world
Server Response:
dlrow olleh
You can open multiple terminals and run multiple clients simultaneously.
Each client will be handled by a separate thread on the server.
- Default port and host are set in the code (e.g.,
localhost:2020) - You can customize it by editing the
Server.javaandClient.javafiles - Gracefully handles client disconnection
Made with ❤️ by Abhinesh Jha
Feel free to fork, contribute, or raise issues!