How we can make simple java program for Server/Client Communication



How we can make simple java program for Server/Client Communication..

Answer / Varun Kumar Jaiswal

"A simple Java program for Server-Client communication can be created using Socket programming. Here is an outline of the server and client programs:
Server Side:
1. Create a server socket on a specific port.
2. Wait for the client connection request and accept it.
3. Communicate with the client using InputStream and OutputStream.
Client Side:
1. Create a socket connection to the server on a specific IP address and port.
2. Send data to the server using OutputStream and receive data from the server using InputStream."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Java Networking Interview Questions

What is the main difference between Client side Java Script and and Server side Java Script how actually they run on both side with Example.

1 Answers   MCN Solutions,


What is meant by TCP, IP, UDP?

11 Answers   TCS, Wipro,


Is there any difference between TCP/IP and TCP?

4 Answers  


What is a client tester?

1 Answers  


What is an http redirector?

1 Answers  


What is the use of network interface?

1 Answers  


What are the advantages and disadvantages of sockets?

1 Answers  


What is a port?

6 Answers  


how to know which version of java is running on ur computer using command prompt?

2 Answers   BeBo Technologies,


What is meant by time-slicing?

9 Answers   Accenture, Wipro,


Tell me about networking classes and interfaces.

1 Answers   Akamai Technologies,


What is cookies in networking ?

1 Answers   Akamai Technologies,


Categories