Returns a server socket bound to the specified port, with a specified listen backlog and local IP.
The ifAddress
argument can be used on a multi-homed host for a ServerSocket
that will only accept connect requests to one of its addresses. If ifAddress
is null, it will accept connections on all local addresses. The socket is configured with the socket options (such as accept timeout) given to this factory.
The backlog
argument must be a positive value greater than 0. If the value passed if equal or less than 0, then the default value will be assumed.
If there is a security manager, its checkListen
method is called with the port
argument as its argument to ensure the operation is allowed. This could result in a SecurityException.