A new Socket s
is created and, if there is a security manager, the security manager's checkAccept
method is called with s.getInetAddress().getHostAddress()
and s.getPort()
as its arguments to ensure the operation is allowed. This could result in a SecurityException.
@exception IOException if an I/O error occurs when waiting for aconnection.
@exception SecurityException if a security manager exists and its checkAccept
method doesn't allow the operation.
@exception SocketTimeoutException if a timeout was previously set with setSoTimeout andthe timeout has been reached.
@exception java.nio.channels.IllegalBlockingModeException if this socket has an associated channel, the channel is in non-blocking mode, and there is no connection ready to be accepted
@return the new Socket
@see SecurityManager#checkAccept
@revised 1.4
@spec JSR-51
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|