| MemoryBlockStreamReadAsync(Byte, Int32, Int32, CancellationToken) Method |
Asynchronously read a sequence of bytes from the stream and advances the position
within the stream by the number of bytes read.
Namespace: MimeKit.IOAssembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax public override Task<int> ReadAsync(
byte[] buffer,
int offset,
int count,
CancellationToken cancellationToken
)
Parameters
- buffer Byte
- The buffer to read data into.
- offset Int32
- The offset into the buffer to start reading data.
- count Int32
- The number of bytes to read.
- cancellationToken CancellationToken
- The cancellation token.
Return Value
TaskInt32The total number of bytes read into the buffer. This can be less than the number of bytes requested if
that many bytes are not currently available, or zero (0) if the end of the stream has been reached.
Exceptions Remarks
Reads a sequence of bytes from the stream and advances the position
within the stream by the number of bytes read.
See Also