Computer Science, asked by avkacharyulu985, 1 year ago

Write a socket program (client/server program) to send a text/character to server and server receives it.

Answers

Answered by Rohit089
0
ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners See details
careerbless.com
navigation...
Java Program to Send a Message from Client to Server and Receive a Response Back Using Socket Programming
What this program does?
This Java Program

1. Make Use of Java Socket Programming

2. It starts a server which will be always running listening to a port 25000 (Server.java)

3. Client (Client.java) sends a number (message) to the server

4. Server receives this number and multiplies it by 2

5. Server (Server.java) sends back the result (message) to the client (Client.java)

6. In case the number sent by the client was not a proper number, server (Server.java) sends back the message “Please send a proper number” to the client (Client.java)

Note: Please run Server.java because server should be ready before client sends the message l
Similar questions