SelectionKey.IsConnectable Property

Definition

Tests whether this key's channel has either finished, or failed to finish, its socket-connection operation.

public bool IsConnectable { [Android.Runtime.Register("isConnectable", "()Z", "")] get; }
[<get: Android.Runtime.Register("isConnectable", "()Z", "")>]
member this.IsConnectable : bool

Property Value

true if, and only if, readyOps() & OP_CONNECT is nonzero

Attributes

Exceptions

if the key has already been canceled.

Remarks

Tests whether this key's channel has either finished, or failed to finish, its socket-connection operation.

An invocation of this method of the form k.isConnectable() behaves in exactly the same way as the expression

<blockquote>

{@code
            k.readyOps() & OP_CONNECT != 0
            }

</blockquote>

If this key's channel does not support socket-connect operations then this method always returns false.

Java documentation for java.nio.channels.SelectionKey.isConnectable().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to