0
6.9kviews
Write a Program for Client Server Application using Socket Programming
1 Answer
4
299views

TCP/IP Socket Programming:

  1. The two key classes from the java.net package used in creation of server and client programs are: a. ServerSocket. b. Socket.

  2. A server program creates a specific type of socket that is used to listen for client requests (server socket).

  3. 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.

  4. The socket abstraction is very similar to the file concept: Developers have to open a socket, perform I/O, and close it.

  5. Figure below illustrates key steps involved in creating socket-based server and client programs.

enter image description here

Server Socket Programming in Java:

enter image description here

Client Socket Programming in Java:

enter image description here

Please log in to add an answer.