Udostępnij za pośrednictwem


SelectableChannel.ConfigureBlocking(Boolean) Method

Definition

Adjusts this channel's blocking mode.

[Android.Runtime.Register("configureBlocking", "(Z)Ljava/nio/channels/SelectableChannel;", "GetConfigureBlocking_ZHandler")]
public abstract Java.Nio.Channels.SelectableChannel? ConfigureBlocking (bool block);
[<Android.Runtime.Register("configureBlocking", "(Z)Ljava/nio/channels/SelectableChannel;", "GetConfigureBlocking_ZHandler")>]
abstract member ConfigureBlocking : bool -> Java.Nio.Channels.SelectableChannel

Parameters

block
Boolean

If true then this channel will be placed in blocking mode; if false then it will be placed non-blocking mode

Returns

This selectable channel

Attributes

Exceptions

if this channel is closed.

if block is true and this channel has been registered with at least one selector.

if an I/O error occurs.

Remarks

Adjusts this channel's blocking mode.

If this channel is registered with one or more selectors then an attempt to place it into blocking mode will cause an IllegalBlockingModeException to be thrown.

This method may be invoked at any time. The new blocking mode will only affect I/O operations that are initiated after this method returns. For some implementations this may require blocking until all pending I/O operations are complete.

If this method is invoked while another invocation of this method or of the #register(Selector, int) register method is in progress then it will first block until the other operation is complete.

Java documentation for java.nio.channels.SelectableChannel.configureBlocking(boolean).

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