Skip to content

Prem203/Java-Server-Client-Activity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TCP Client-Server Reverse and Case Transform Program

This project implements a TCP client-server application where the client sends a string to the server, and the server:

  1. Reverses the string.
  2. Inverts the capitalization of each character (lowercase becomes uppercase and vice versa).

Features

  • Dynamic port number for both client and server.
  • Handles strings up to 80 characters.
  • Includes string validation for length.
  • Proper exception handling for both client and server.
  • User-friendly error messages in case of invalid inputs.

Steps to Run

1. Clone the repository:

git clone https://github.com/Prem203/Java-Server-Client-Activity.git
cd tcp-client-server

2. Compile the code:

javac Server.java
javac Client.java

3. Run the server:

java Server <port>

##Example:

java Server 32000

4. Run the client:

java Client <server_ip> <port>

##Example:

java Client 127.0.0.1 32000

5. Enter your string (up to 80 characters):

Enter text: This is my text
Response from server: TXET YM SI SIHt

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages