Table of Contents

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

readerHandle FfiHandle

Properties

Error

Error that occurred on the last read, if any.

public StreamError Error { get; }

Property Value

StreamError

IsError

True if an error occurred on the last read.

public bool IsError { get; }

Property Value

bool

LatestChunk

protected TContent LatestChunk { get; }

Property Value

TContent

Methods

MatchesHandle(ulong)

protected bool MatchesHandle(ulong eventHandle)

Parameters

eventHandle ulong

Returns

bool

OnChunk(TContent)

protected void OnChunk(TContent content)

Parameters

content TContent

OnEos(StreamError)

protected void OnEos(StreamError protoError)

Parameters

protoError StreamError

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.