Class ReadIncrementalInstructionBase<TContent>
- Namespace
- LiveKit
Shared state and helpers for incremental stream reader yield instructions. Holds the latest chunk, end-of-stream flag, and error; subclasses own the typed event subscription and convert raw event payloads via OnChunk(TContent) and OnEos(StreamError).
public abstract class ReadIncrementalInstructionBase<TContent> : StreamYieldInstruction
Type Parameters
TContent
- Inheritance
-
ReadIncrementalInstructionBase<TContent>
- Derived
- Inherited Members
- Extension Methods
Constructors
ReadIncrementalInstructionBase(FfiHandle)
protected ReadIncrementalInstructionBase(FfiHandle readerHandle)
Parameters
readerHandleFfiHandle
Properties
Error
Error that occurred on the last read, if any.
public StreamError Error { get; }
Property Value
IsError
True if an error occurred on the last read.
public bool IsError { get; }
Property Value
LatestChunk
protected TContent LatestChunk { get; }
Property Value
- TContent
Methods
MatchesHandle(ulong)
protected bool MatchesHandle(ulong eventHandle)
Parameters
eventHandleulong
Returns
OnChunk(TContent)
protected void OnChunk(TContent content)
Parameters
contentTContent
OnEos(StreamError)
protected void OnEos(StreamError protoError)
Parameters
protoErrorStreamError
Reset()
Resets the yield instruction for the next read.
public override void Reset()
Remarks
Calling this method after IsEos is true will throw an exception.