0
7.4kviews
Write a Program for Client Server Application using Socket Programming
1 Answer
4
308views
| written 9.4 years ago by |
TCP/IP Socket Programming:
The two key classes from the java.net package used in creation of server and client programs are: a. ServerSocket. b. Socket.
A server program creates a specific type of socket that is used to listen for client requests (server socket).
In the case of a connection request, the program creates a new socket through which it will exchange data with the client using input and output streams.
The socket abstraction is very similar to the file concept: Developers have to open a socket, perform I/O, and close it.
Figure below illustrates key steps involved in creating socket-based server and client programs.

Server Socket Programming in Java:

Client Socket Programming in Java:

ADD COMMENT
EDIT
Please log in to add an answer.

and 4 others joined a min ago.