HeaderListWriteToAsync(Stream, CancellationToken) Method

Asynchronously write the HeaderList to the specified output stream.

Definition

Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public Task WriteToAsync(
	Stream stream,
	CancellationToken cancellationToken = default
)

Parameters

stream  Stream
The output stream.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

Task
A task that represents the asynchronous write operation.

Remarks

Writes all the headers to the output stream.

Exceptions

ArgumentNullException stream is .
OperationCanceledException The operation was canceled via the cancellation token.
IOException An I/O error occurred.

See Also