Java.Nio.Channels.SocketChannel.FinishConnect Method
Completes the connection process initiated by a call of connect(SocketAddress).

Syntax

[Android.Runtime.Register("finishConnect", "()Z", "GetFinishConnectHandler")]
public abstract bool FinishConnect ()

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Nio.Channels.NoConnectionPendingExceptionif the channel is not connected and the connection process has not been initiated.
Java.Nio.Channels.ClosedChannelExceptionif this channel is closed.
Java.Nio.Channels.AsynchronousCloseExceptionif this channel is closed by another thread while this method is executing.
Java.Nio.Channels.ClosedByInterruptExceptionif 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.IOExceptionif an I/O error occurs.

Remarks

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.

[Android Documentation]

Requirements

Namespace: Java.Nio.Channels
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1