Otter SDK Reference
Version:

WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) Method

Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.

Syntax

public virtual System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken)

Parameters

buffer
Type: byte[]

The buffer to write data from.

offset
Type: int

The zero-based byte offset in buffer from which to begin copying bytes to the stream.

count
Type: int

The maximum number of bytes to write.

cancellationToken
Type: System.Threading.CancellationToken

The token to monitor for cancellation requests. The default value is System.Threading.CancellationToken.None.

Returns

A task that represents the asynchronous write operation.