ITransferProducerFillAsync Method

Fills a single buffer with data from the file as determined by its Memory and Sequence properties. Failure must be signaled by throwing an exception. This method will be invoked concurrently when MaxConcurrency is greater than 1. The driver stops invoking this method after an error has occurred.

WARNINGS: The buffer MUST be completely filled with data unless this is the last block of the file. If this rule is not followed, data will be corrupt at the destinations. Do NOT keep a reference to buffer, or any of its members, for later use outside of this method.

Definition

Namespace: Quine.FileTransfer
Assembly: Quine.FileTransfer (in Quine.FileTransfer.dll) Version: 1.0.0+6efd94d5454131cfac18f827c2a4172cb83f1e24
C#
Task<int> FillAsync(
	ITransferBuffer buffer
)

Parameters

buffer  ITransferBuffer
Buffer to fill. The sequence number might indicate a position beyond EOF, in which case the method must retun 0.

Return Value

TaskInt32
Length of the initial portion of buffer that was filled with valid data. To signal EOF, return 0.

See Also