ICancellable StreamWrite Method
Write a sequence of bytes to the stream and advances the current
position within this stream by the number of bytes written.
Definition
Namespace: MimeKit.IO
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
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.