What is ServerSocket. How will you create a connection

Showing Answers 1 - 2 of 2 Answers

Arun

  • Jul 21st, 2005
 

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.

  Was this answer useful?  Yes

Sumeeth R Tewar

  • Jul 12th, 2006
 

ServerSocket is a class for creating a server side connection for remote clients to connect to,

On client connection success, returns an ordinary socket which can later be used to communicate with the client.

For a connection to be created it requires the portNo. and the maxQueue is optional.

maxQueue means the maximum number of clients that can access the Server.

Syntax :

ServerSocket ss = new ServerSocket(portNo);

OR

ServerSocket ss = new ServerSocket(portNo,maxQueue);

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions