Search Results for

    Show / Hide Table of Contents

    Class TextThrottler

    Throttles incoming streaming text and emits it in fixed-size chunks at a fixed interval. Designed for runtime usage (MonoBehaviour).

    Inheritance
    object
    TextThrottler
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.IO.Networking
    Assembly: Glitch9.IO.dll
    Syntax
    public sealed class TextThrottler : IDisposable

    Constructors

    | Edit this page View Source

    TextThrottler(int, int)

    Declaration
    public TextThrottler(int charsPerTick = 32, int tickMs = 80)
    Parameters
    Type Name Description
    int charsPerTick
    int tickMs

    Methods

    | Edit this page View Source

    AppendDelta(string)

    Declaration
    public void AppendDelta(string delta)
    Parameters
    Type Name Description
    string delta
    | Edit this page View Source

    Complete(bool)

    Declaration
    public void Complete(bool immediate = true)
    Parameters
    Type Name Description
    bool immediate
    | Edit this page View Source

    Dispose()

    Declaration
    public void Dispose()
    | Edit this page View Source

    ResetAll()

    Declaration
    public void ResetAll()
    | Edit this page View Source

    Tick(int)

    Call this method periodically (e.g., from a timer or Unity Update) with elapsed ms.

    Declaration
    public void Tick(int elapsedMs)
    Parameters
    Type Name Description
    int elapsedMs

    Events

    | Edit this page View Source

    OnTick

    Declaration
    public event Action<string> OnTick
    Event Type
    Type Description
    Action<string>
    | Edit this page View Source

    OnTickCompleted

    Declaration
    public event Action OnTickCompleted
    Event Type
    Type Description
    Action

    Implements

    IDisposable

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.TryDispose(IDisposable)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation