Question: JAVA Create a client-server application with a server that runs indefinitely and processes textual input from the client. The communication protocol between the server and
JAVA
Create a client-server application with a server that runs indefinitely and processes textual input from the client.
The communication protocol between the server and the client, after the connection setup, is as follows:
-. Server:
Sends a request to the client: "Welcome to text-server v0.1. Available server string processing mode: A = echo input; B = duplicate input; C = reverse input; D = uppercase input. Please select server mode: "
-. Client:
Accepts request message.
Sends a string to the server, with a valid selected server mode.
-. Server:
Accepts server mode message.
Sends a message to the client with the current server mode: "Selected server mode: (mode selected). Enter message. To end the connection, enter '.' "
-. Server
Accepts client messages.
-. Client
Reads message from keyboard and sends it to the server.
If message is '.', close link connection.
-. Server
Accepts client message.
If message is '.', close link connection.
Processes the string message according to the server mode selected.
Sends the processed message to the client.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
