- address
- the address to connect with.
Documentation for this section has not yet been entered.
Type Reason Java.Nio.Channels.AlreadyConnectedException if the channel is already connected. Java.Nio.Channels.ConnectionPendingException a non-blocking connecting operation is already executing on this channel. 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 will have the interrupt state set and this channel will be closed. Java.Nio.Channels.UnresolvedAddressException if the address is not resolved. Java.Nio.Channels.UnsupportedAddressTypeException if the address type is not supported. Java.IO.IOException if an I/O error occurs.
Connects this channel's socket with a remote address.
If this channel is blocking, this method will suspend until connecting is finished or an I/O exception occurs. If the channel is non-blocking, this method will return true if the connection is finished at once or return false when the connection must be finished later by calling finishConnect().
This method can be called at any moment and can block other read and write operations while connecting. It executes the same security checks as the connect method of the Socket class.