Click or drag to resize
S101ReaderReadAsync Method
Asynchronously reads the next message.

Namespace: Lawo.EmberPlusSharp.S101
Assembly: Lawo.EmberPlusSharp (in Lawo.EmberPlusSharp.dll) Version: 1.4.1707.27006
Syntax
C#
public Task<bool> ReadAsync(
	CancellationToken cancellationToken
)

Parameters

cancellationToken
Type: System.ThreadingCancellationToken

Return Value

Type: TaskBoolean
true if the next message was read successfully; false if there are no more messages to read.
Exceptions
ExceptionCondition
ExceptionAn exception was thrown from the callback passed to the constructor, see Message for more information.
InvalidOperationExceptionThe IsCompleted property is false for the Task object returned by a previously called async method.
ObjectDisposedExceptionDisposeAsync(CancellationToken) has been called.
S101ExceptionAn error occurred while parsing the S101-encoded data, see Message for more information.
Remarks

When a S101Reader is first created and initialized, there is no information available. You must call ReadAsync(CancellationToken) to read the first message.

Possibly unread payload of the previous message is automatically skipped.

See Also