This repository contains a Java project with multiple examples of TCP socket communication.
The FactorialServer
class implements a TCP socket server. It accepts connections from clients, receives an integer from the client, calculates the factorial of that number, and sends the result back to the client.
To use this project, follow these steps:
- Clone the repository to your local machine:
git clone https://github.com/decodevm/socket-tcp.git
- Navigate to the tcp-socket/src/main/java/com/decodev/additional_part1 directory:
cd tcp-socket/src/main/java/com/decodev/additional_part1
- Compile the Java files:
javac FactorialServer.java FactorialClient.java
- Run the server for factorial calculation:
java FactorialServer
- Connect your client application to the server using TCP socket programming:
java FactorialClient
This project was developed by:
Contributions are welcome! If you'd like to contribute to this project, feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.