1.

Which methods are commonly used in Server Socket class?(a) Public Output Stream get Output Stream ()(b) Public Socket accept ()(c) Public synchronized void close ()(d) Public void connect ()I had been asked this question in an international level competition.Enquiry is from Socket Programming topic in section Networking of Computer Network

Answer»

Correct option is (b) Public Socket accept ()

To explain I would say: The Public socket accept () method is used by the ServerSocket CLASS to accept the connection request of exactly ONE client at a time. The client requests by initializing the socket OBJECT with the servers IP address.



Discussion

No Comment Found

Related InterviewSolutions