Click or drag to resize
MimeKit

ICancellableStreamWrite Method

Write a sequence of bytes to the stream and advances the current position within this stream by the number of bytes written.

Namespace: MimeKit.IO
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
void Write(
	byte[] buffer,
	int offset,
	int count,
	CancellationToken cancellationToken
)

Parameters

buffer  Byte
The buffer to write.
offset  Int32
The offset of the first byte to write.
count  Int32
The number of bytes to write.
cancellationToken  CancellationToken
The cancellation token
Remarks

When a custom stream implementation also implements this interface, writing a MimeMessage or MimeEntity to the custom stream will opt to use this interface instead of the normal Write(Byte, Int32, Int32) API to write data to the stream.

This is really useful when writing a message or other MIME entity directly to a network-based stream.

See Also