InterviewSolution
Saved Bookmarks
| 1. |
Role of Java Sockets |
|
Answer» The Java Sockets are USED for communication between two computers using the TCP PROTOCOL. The communication between the client and server occurs when they read from and write to the sockets as required. The class java.net.Socket provides a representation for sockets in Java and the class java.net.ServerSocket allows the server programs to listen for clients and create connections with them. The steps to create a TCP connection between two computers using sockets is given as follows:
The communication can occur using the Output stream and INPUT stream after the connections are established. |
|