ServerSockets class used to create servers listen for either local client or remote client programs

Q.  Which class is used to create servers that listen for either local client or remote client programs?
- Published on 15 Jul 15

a. ServerSockets
b. httpServer
c. httpResponse
d. None of the above

ANSWER: ServerSockets
 

    Discussion

  • Prajakta Pandit   -Posted on 15 Dec 15

    - ServerSockets class is used to create servers that listen for either local client or remote client programs.

    - It has four constructors:

    1. public ServerSocket(int port)throws IOException
    2. public ServerSocket(int port, int backlog)throws IOException
    3. public ServerSocket(int port, int backlog, InetAddress address)throws IOException
    4. public ServerSocket()throws IOException

    - If the ServerSocket constructor does not throw an exception, it means that your application has successfully bound to the specified port and it is ready for the client request.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)