Documentation for this section has not yet been entered.
Type Reason Java.Nio.Channels.NoConnectionPendingException if the channel is not connected and the connection process has not been initiated. Java.Nio.Channels.ClosedChannelException if this channel is closed. Java.Nio.Channels.AsynchronousCloseException if this channel is closed by another thread while this method is executing. Java.Nio.Channels.ClosedByInterruptException if another thread interrupts the calling thread while this operation is in progress. The calling thread has the interrupt state set, and this channel is closed. Java.IO.IOException if an I/O error occurs.
Completes the connection process initiated by a call of connect(SocketAddress).
This method returns true if the connection is finished already and returns false if the channel is non-blocking and the connection is not finished yet.
If this channel is in blocking mode, this method will suspend and return true when the connection is finished. It closes this channel and throws an exception if the connection fails.
This method can be called at any moment and it can block other read and write operations while connecting.