Click or drag to resize
S101WriterWriteMessageAsync Method
Asynchronously writes message.

Namespace: Lawo.EmberPlusSharp.S101
Assembly: Lawo.EmberPlusSharp (in Lawo.EmberPlusSharp.dll) Version: 1.4.1707.27006
Syntax
C#
public Task<NonSeekableStream> WriteMessageAsync(
	S101Message message,
	CancellationToken cancellationToken
)

Parameters

message
Type: Lawo.EmberPlusSharp.S101S101Message
The message to write.
cancellationToken
Type: System.ThreadingCancellationToken
The token to monitor for cancellation requests.

Return Value

Type: TaskNonSeekableStream

A Stream instance that can be used to write the payload of message, if message can have a payload; otherwise null. Call DisposeAsync(CancellationToken) after writing the payload.

Exceptions
ExceptionCondition
ArgumentNullExceptionmessage equals null.
ExceptionAn exception was thrown from the callback passed to the constructor, see Message for more information.
InvalidOperationException
ObjectDisposedExceptionDisposeAsync(CancellationToken) has been called.
Remarks

If necessary, the message plus payload is automatically partitioned into multiple packets such that the unencoded length of each packet does not exceed 1024 bytes.

See Also