Język

IGatheringByteChannelExtensions.WriteAsync Method

Definition

Overloads

Name Description
WriteAsync(IGatheringByteChannel, ByteBuffer[])

Runs the channel's synchronous gathering write from all supplied buffers in a task.

WriteAsync(IGatheringByteChannel, ByteBuffer[], Int32, Int32)

Runs the channel's synchronous gathering write from the selected buffers in a task.

WriteAsync(IGatheringByteChannel, ByteBuffer[])

Runs the channel's synchronous gathering write from all supplied buffers in a task.

public static System.Threading.Tasks.Task<long> WriteAsync(this Java.Nio.Channels.IGatheringByteChannel self, Java.Nio.ByteBuffer[]? srcs);
static member WriteAsync : Java.Nio.Channels.IGatheringByteChannel * Java.Nio.ByteBuffer[] -> System.Threading.Tasks.Task<int64>

Parameters

self
IGatheringByteChannel

The channel to which bytes are written.

srcs
ByteBuffer[]

The source buffers in array order. Each buffer's position advances by the bytes taken from it; buffer limits are unchanged.

Returns

A task whose result is the total number of bytes written, possibly zero. Some channels can write fewer than the buffers' remaining bytes.

Remarks

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

WriteAsync(IGatheringByteChannel, ByteBuffer[], Int32, Int32)

Runs the channel's synchronous gathering write from the selected buffers in a task.

public static System.Threading.Tasks.Task<long> WriteAsync(this Java.Nio.Channels.IGatheringByteChannel self, Java.Nio.ByteBuffer[]? srcs, int offset, int length);
static member WriteAsync : Java.Nio.Channels.IGatheringByteChannel * Java.Nio.ByteBuffer[] * int * int -> System.Threading.Tasks.Task<int64>

Parameters

self
IGatheringByteChannel

The channel to which bytes are written.

srcs
ByteBuffer[]

The source buffer array. Selected buffers are read in array order, advancing their positions without changing their limits.

offset
Int32

The index of the first source buffer, from zero through the array length.

length
Int32

The number of source buffers to use, from zero through the array length minus offset.

Returns

A task whose result is the total number of bytes written, possibly zero. Some channels can write fewer than the selected buffers' remaining bytes.

Remarks

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