| S101WriterWriteMessageAsync Method | 
Namespace: Lawo.EmberPlusSharp.S101
public Task<NonSeekableStream> WriteMessageAsync( S101Message message, CancellationToken cancellationToken )
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.
| Exception | Condition | 
|---|---|
| ArgumentNullException | message equals null. | 
| Exception | An exception was thrown from the callback passed to the constructor, see Message for more information. | 
| InvalidOperationException | 
  | 
| ObjectDisposedException | DisposeAsync(CancellationToken) has been called. | 
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.