APPLICATION LAYER
SOCKET INTERFACE PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
SocketServer
|
|
ServerSocket
|
|
Socket
|
|
socketserver
|
Detailed explanation-1: -Class ServerSocket. This class implements server sockets. A server socket waits for requests to come in over the network. It performs some operation based on that request, and then possibly returns a result to the requester.
Detailed explanation-2: -Socket class represents a socket, and the java. net. ServerSocket class provides a mechanism for the server program to listen for clients and establish connections with them. The server instantiates a ServerSocket object, denoting which port number communication is to occur on.
Detailed explanation-3: -One socket (node) listens on a particular port at an IP, while other socket reaches out to the other in order to form a connection. The server forms the listener socket while the client reaches out to the server. Socket and Server Socket classes are used for connection-oriented socket programming.